powerhouse has asked for the wisdom of the Perl Monks concerning the following question:
I then have the script get the field... in the variable $itDetail Then I have it split it to get the line:22009^1^52.90 22010^1^42.90 22011^1^32.90 # Always a empty line at the end...
Then inside of that while statement, I am getting each of the 3 details I need...while($itDetail) { (my $_line, $itDetail) = split /\015\012/, $itDetail, 2; ...
Now my problem is that $Num has a value of Num^Qt^xx.xx(my $Num, $_line) = split /\^/, $_line, 2; my ($Qt, $_trashit) = split /\^/, $_line, 2; $_line = ""; # Reset the variable, just for my sake. # Do some things.... }
That is how I figured out it is having a problem.open(FH,">>/some/path/debug.txt") or die "could not open file for writ +ing: $!"; print FH '$Num = ', $Num, "\n"; close(FH);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: split problem...
by graff (Chancellor) on Sep 27, 2004 at 06:59 UTC | |
|
Re: split problem...
by tachyon (Chancellor) on Sep 27, 2004 at 06:40 UTC | |
by ysth (Canon) on Sep 27, 2004 at 06:50 UTC | |
by tachyon (Chancellor) on Sep 27, 2004 at 06:59 UTC | |
|
Re: split problem...
by TedPride (Priest) on Sep 27, 2004 at 06:50 UTC |