Close!

(Assuming parent post is by OP, Ma): you have a space inside the name of one of your variables, $mo veoutdt. But that's harder than need be to spot, since you failed to follow the guidance at the text-input box, namely -- use code and para tags.

As to your other code problems, you've invoked strict,(and, very wisely), but without honoring one of its key strictures, declaring variables with a my (or our etc). The error messages should have given you a direction to repair the problem, though there were so many you may have found them overwhelming (go forth and sin no more).

Here's your code, modified to use data rather than a file and truncated for simplicity and clarity:

#!/usr/bin/perl use strict; use warnings; my ($dt, $account, $baldue); while (<DATA>) { chomp; ($dt, $account, $baldue) = split /\t/; # shorter, more standard. + was: split("\t"); print "$dt | $account | $baldue \n"; } =head OUTPUT 4-11-13 273.13 273.13 20130512 11.17 36.14 09222013 2,479.00 6,481.16 =cut __DATA__ 4-11-13 273.13 273.13 20130512 11.17 36.14 09222013 2,479.00 6,481.16

In reply to Re^3: Split Tab separated text file into valid and invalid records by ww
in thread Split Tab separated text file into valid and invalid records by Ma

Title:
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, 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:
    & &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.