in reply to diamond operator multiple input
You should be more specific about what "does not work" means. What happens? What did you expect to happen?
My guess (without running code) is that lc forces scalar context on its single argument. You want a list, so this will work better:
my ($dginput, $volinput) = map { chomp; lc } <>;Consider that because Perl is not a lazy language, it'll read everything from STDIN and throw away all but the first two elements. That could be a lot of work.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: diamond operator multiple input
by johngg (Canon) on Jan 22, 2009 at 13:26 UTC | |
by ikegami (Patriarch) on Jan 22, 2009 at 14:17 UTC | |
by johngg (Canon) on Jan 22, 2009 at 19:41 UTC | |
|
Re^2: diamond operator multiple input
by ikegami (Patriarch) on Jan 21, 2009 at 23:32 UTC | |
by chromatic (Archbishop) on Jan 22, 2009 at 09:47 UTC | |
by ikegami (Patriarch) on Jan 22, 2009 at 14:13 UTC |