Just another Perl shrine | |
PerlMonks |
Re: Re: Re: Using "my" suppresses "Name used only once" warning?by demerphq (Chancellor) |
on Feb 03, 2003 at 13:56 UTC ( [id://232235]=note: print w/replies, xml ) | Need Help?? |
The using a string as a number thing was because I was testing what warnings were given and set a variable to 1 (numeric), concanated it with "1" with the . operand and then added a numeric number 1 to it, without getting any warnings about it. This seems reasonable to me. Just assume that any time you do math with strings, or string operations with numbers that perl silently handles the type conversions required. So the below can be implictily read as but is much less confusing. Dont knock it, eventually youll wonder why it isnt this easy in all of the other languages... ;-)
--- demerphq
In Section
Seekers of Perl Wisdom
|
|