in reply to Re: diamond operator multiple input
in thread diamond operator multiple input
As there are two "things" I'd consider statements I'd rather use the usual form of for().
I find it less confusing. This is not golf.for my ($dginput, $volinput) { $_ = lc <>; chomp; }
Update: Whoops. That's what I get for not testing the code. No it would not work in 5.10 either. Forget everything I said, you'd have to write it like this:
Even if I fix the syntax error (by adding one more pair of braces) the variables to not stay declared outside the loop. So it might have been less confusing, but it was plain wrong. Sorry.my ($dginput, $volinput); for ($dginput, $volinput) { $_ = lc <>; chomp; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: diamond operator multiple input
by graff (Chancellor) on Jan 22, 2009 at 03:17 UTC |