in reply to array input "@array = lc(<>)"

lc provides scalar context to its argument.
my @array = map {lc} <>;
should do the trick.

Replies are listed 'Best First'.
Re^2: array input "@array = lc(<>)"
by AnomalousMonk (Archbishop) on May 12, 2010 at 15:20 UTC

    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' ];
      yeah I just did:

      chomp(my @input = map {lc} <>);