#Read all transactions my $lref; my $line = ''; my @fields = (); my @alltrans = (); open( ALL, "<alltrans.csv" ) or die "can't open alltrans.csv"; while( <ALL> ) { chomp; $line = $_ . ' '; #ugly as only copes with one trailing null fi +eld @fields = split( ',', $line ); $fields[-1] = ( $fields[-1] eq ' ' ) ? '' : $fields[-1]; $lref = [ @fields ]; push( @alltrans, $lref ); } close ALL; print Dumper @alltrans;
In reply to Split Trailing Nulls by p6steve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |