Ok, I guess you are in a Microsoft environment. Let's test using Strawberry Perl 5.10.0.1 under Microsoft Windows XP SP3:
C:\> perl -F, -lane "@F % 2 and push @D, {q{Stamp},@F} or $D[-1] = { %
+{$D[-1] }, @F } }{ $,=q{,}; print @{$_}{qw(Stamp Login SearchResults
+SearchLoad SearchCount Logout)} for @D" input.txt
1/3/2007 12:20:01 AM,12.588309,7.418672,9.432586,20:0.196329,0.823402
1/3/2007 12:49:22 AM,10.958312,,,41:0.483233,
Seems to work as expected, so I think you made some typo when trying to comply with Gate's rules.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.