The answer is that @array is global variableBullshit.
@array is a lexical variable.
The declaration with my is never executed because the "if" test fails.Bullshit.
The declaration part of my is being done. Because that happens at compile time.
Try also using the strict and warnings pragmas in your coding.The code presented is strict clean, and warnings free. Don't go pretending strict and warnings are silver bullets. They aren't.
In reply to Re^2: A curious case of of my()
by JavaFan
in thread A curious case of of my()
by fleetingflicker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |