in reply to Re: diamond operator multiple input
in thread diamond operator multiple input
Doing map { chomp; lc } <>; generates a "Useless use of lc in void context ..." error, lc $_ seems to solve that. You could avoid reading the whole file by explicitly doing a scalar <> twice.
$ cat zzzz AAAA BBBB CCCC DDDD EEEE $ perl -e ' > ( $dg, $vo ) = map { map { chomp; lc $_ } scalar <> } 1 .. 2; > print qq{$dg, $vo\n}; > print q{-} x 15, qq{\n}; > print for <>;' zzzz aaaa, bbbb --------------- CCCC DDDD EEEE $
I hope this is of interest.
Cheers,
JohnGG
Update: As ikegami points out, the warning I saw seems to be a figment of my imagination. Please ignore that part of the post.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: diamond operator multiple input
by ikegami (Patriarch) on Jan 22, 2009 at 14:17 UTC | |
by johngg (Canon) on Jan 22, 2009 at 19:41 UTC |