Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: why does it work? Single bareword assignment to scalar under no strict

by JavaFan (Canon)
on Nov 10, 2010 at 22:46 UTC ( [id://870713]=note: print w/replies, xml ) Need Help??


in reply to why does it work? Single bareword assignment to scalar under no strict

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://870713]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-24 20:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found