Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

G'day RedTussock,

Welcome to the monastery.

I'm reasonably certain that your problem is in map qq/"$_"/, @fields[ 0 .. 5 ] and is probably caused by @fields not containing 6 elements. Here's some troubleshooting hints.

Check the files you're reading (i.e. ls -l /home/Smitty/scripts/perl/dl_parser/down/*). Are all of these the files you want? Perhaps use *.txt (or similar) to limit the files you're processing.

Do all of the files have the format you're expecting? You may be able to check this by inspection. If not, add some debugging code around while (<>) { like this:

my $last_file = ''; while (<>) { print "$ARGV\n" if $ARGV ne $last_file; $last_file = $ARGV;

[perlop - I/O Operators explains <> and $ARGV]

You should see something like:

some_file_name another_file_name Use of uninitialized value in ... different_file_name Use of uninitialized value in ...

You'll now know which files are causing the problems and you can focus your investigation accordingly.

-- Ken

In reply to Re^7: Parsing Data logger files ... by kcott
in thread Parsing Data logger files ... by RedTussock

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
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others having an uproarious good time at the Monastery: (10)
    As of 2018-03-20 11:43 GMT
    Find Nodes?
      Voting Booth?
      When I think of a mole I think of:

      Results (250 votes). Check out past polls.