in reply to Newbie Q re: Undefined Value and "only used once" warnings
Yes, perl is case sensitive, so my instead of My.
About $^W= 0;, it runs at run-time, so it won't affect the "once" warning, which is generated at conpile-time. To remedy, either put the $^W in a begin-block (like BEGIN {$^W= 0;}), or with perl >=5.6, use the warnings pragma: no warnings "once"; turns off just the "once" warnings, and it's scoped lexically to the block, so you can write {no warnings; SOME CODE THAT WOULD GIVE A WARNING } and hush, the effect is gone when you close the block. (no warnings affects both compile-time and run-time warnings.)
Corrected typo s/rub-time/run-time/ noted by arden. Thx.
|
|---|