Perhaps something like this:foreach my $line (@port) { my @PORTS = split('\n', $line); foreach my $str (@PORTS){ ... } } }
for my $str ( map { split /\n/ } @port ) { ... }
In reply to Re: array and string split
by Anonymous Monk
in thread array and string split
by numele
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |