in reply to pipe one function output to another
map is the way to do it:
my @arr = map uc, split(/:/, $info);
BTW,
isn't very Perlish. The Perl way (other than using map) would befor(my $i=0; $i<$iLength; $i++) { $arr[$i] = uc($arr[$i]); }
for (@arr) { $_ = uc; }
or even
$_ = uc for @arr
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: pipe one function output to another
by markkawika (Monk) on Aug 14, 2009 at 17:04 UTC |