in reply to Nested Loop Problems
Take care to context (list or scalar) when you use split.
#!perl my @lines=<DATA>; for my $line (@lines) { chomp $line; my @arr = split/,/,$line; print "$arr[0]: $arr[1], $arr[2] and $arr[3]\n"; } __DATA__ name1,a1,b1,c1 name2,a2,b2,c2
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Nested Loop Problems
by cuautemoc (Initiate) on May 02, 2012 at 22:15 UTC | |
by brx (Pilgrim) on May 03, 2012 at 07:44 UTC |