The stupid question is the question not asked | |
PerlMonks |
Re: why does it work? Single bareword assignment to scalar under no strictby JavaFan (Canon) |
on Nov 10, 2010 at 22:46 UTC ( [id://870713]=note: print w/replies, xml ) | Need Help?? |
Remember Perls origins. Perl was created to fill the gap between shell/awk on one side, and C on the other. It should have the best of both worlds. One of handy things of shell scripts is that you don't have to put quotes around single word strings, that is, stuff like cat file is valid, even if file is just a string argument.
So, Perl got it as well. And because backwards compatibility is important, the default is to still allow it. So, without strict, Perl DWIM.
In Section
Seekers of Perl Wisdom
|
|