Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Re: running same bit of code twice

by belg4mit (Prior)
on May 04, 2003 at 18:43 UTC ( [id://255512]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: running same bit of code twice
in thread running same bit of code twice

3-arg open is considered more secure than 2-arg open, as perl won't be looking to change it's behavior based upon any special characters (such as < > |) (update: in the filename). Since 3-arg open has no default (you can't leave the second arg undefined), you must explicitly indicate "open for read-only". Finally, some people simply like to be explicit. Why would you write
foreach my $apple (qw(McIntosh Empire Gala)){ $apple }
When this would do just fine
foreach (qw(McIntosh Empire Gala)){ $_ }

--
I'm not belgian but I play one on TV.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2024-04-25 09:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found