or, expanded,%prod=map{chomp;@a=split/\|/;shift@a,[@a]}<SRC>;
You have to do [@a] instead of \@a if you do not localize the array with "my".%prod = map { chomp; @a = split /\|/; shift(@a) => [@a] } <SRC>
In reply to Re^2: Optimal way to read in pipe delimited files
by bageler
in thread Optimal way to read in pipe delimited files
by narashima
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |