Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
actually I need to make it a little more intelligent than what I currently have as it assumes the fields are all there, and sometimes they are not, ie it might die at some point in my test script say at searchload, and next iteration would start a new row, what happens when I aggregate this is I get "rows" that don't actually line up with the others, munging my data in excel and freaking out my plans to put it into a db, so how would I account for this? I am guessing setting up a hash and testing for a complete row and if not a complete row then dump the data and move on to the next one, but I am just not sure how to do this as I am not that skilled, since the rows would kind of have a fixed field width testing for value in each field might help with this but again unsure how to do it. Thanks altBlue, I tried running your file but it doesn't run I get the following errors..string found where operator expected at at end of line do you need to predeclare lane? bareword found where operator expected near input (missing operator before input?) string found where operator expect at line 7 near "Logout" Login do you need to predeclare logout, syntax error at line 1 next token ??? execution of aborted due to compilation errors. do these switches not work in windows? I guess the lane statement are command line switches? L for label processing This option turns on line-ending processing. It can be used to set the output line terminator variable ($/) by specifying an octal value. See "Example: Using the -0 option" for an example of using octal numbers. If no octal number is specified, the output line terminator is set equal to the input line terminator (such as $\ = $/;). a -for This option must be used in conjunction with either the -n or -p option. Using the -a option will automatically feed input lines to the split function. The results of the split are placed into the @F variable. n- This option places a loop around your script. It will automatically read a line from the diamond operator and then execute the script. It is most often used with the -e option e- The option lets you specify a single line of code on the command line. This line of code will be executed in lieu of a script file. You can use multiple -e options to create a multiple line program-although given the probability of a typing mistake, I'd create a script file instead. Semi-colons must be used to end Perl statements just like a normal script.

In reply to Re^2: parsing text files continued by grashoper
in thread parsing text files continued by grashoper

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • 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, 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, 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    Domain Nodelet?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others studying the Monastery: (3)
    As of 2024-07-13 07:10 GMT
    Find Nodes?
      Voting Booth?

      No recent polls found

      erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.