I am trying to verify datafile contains an entire record before taking the record and making it comma delimited so it can be imported into a db, I am still stuck on this one piece as I keep getting can't find string terminator on my command line when I try it.
input.txt file is the file I want to parse.
lane command line switches l is for label,n for loop etc.
e for eval i think, this was provided by codeblue and I don't totally understand it which is a problem.
stamp is supposed to be the record delimiter but I am not sure how to define it as its a date time value format is
like this
6/15/2008 5:39:10 PM
perl -F -lane '@F %2 and push @D,{q{Stamp},@F} or $D[-1]={% {$D[-1]},@
+F}}{$,=",";print @{$_}{qw(Stamp Login searchload)}for @D' input.txt
in the example I was provided were 2 variables defined as hashes wondering if I need those to populate hash so it understands timestamp will try with those included and postback results later today, interesting it appears to be searching the entire file for the lines containing the hash values then terminates when it cannot find it.
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.