in reply to Re^2: A curious case of of my()
in thread A curious case of of my()
But garlic and cheaper than bullets!
use strict; use warnings; sub tst { my $y if 0; # throws "Deprecated use of my() in false c +onditional" => 123 # my $y if shift; # no warning + => 112 print ++$y } tst(1); tst(); tst();
Anything that helps should be used...
Cheers Rolf
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: A curious case of of my()
by JavaFan (Canon) on Apr 05, 2011 at 11:30 UTC |