in reply to Re^2: Split Tab separated text file into valid and invalid records
in thread Split Tab separated text file into valid and invalid records

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

Replies are listed 'Best First'.
Re^4: Split Tab separated text file into valid and invalid records
by Anonymous Monk on Sep 23, 2013 at 15:14 UTC
    Awsome, Thank you everyone.