And if the OPer wants to get rid of the newlines at the ends of the strings:
>perl -wMstrict -le "my @array = map { chomp; lc } <>; use Data::Dumper; print Dumper \@array; " FOO BAR ^Z $VAR1 = [ 'foo', 'bar' ];
In reply to Re^2: array input "@array = lc(<>)"
by AnomalousMonk
in thread array input "@array = lc(<>)"
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |