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

Re: "open" Best Practices

by swl (Parson)
on Jul 13, 2019 at 03:45 UTC ( [id://11102771]=note: print w/replies, xml ) Need Help??


in reply to "open" Best Practices

Thanks for the write-up, it's very useful. The first para can be read to imply that the not-so-good options are currently best practices.

You will see styles of open such as "open FILE, $filename;" or "open(LOG, ">$filename") || die "Could not open $filename";" in many places. These mainly come from versions of Perl before 5.6.0 (released in 2000), because that version of Perl introduced lexical filehandles and the three-argument open. Since then, they have become a best practice, for the reasons below.

Perhaps reword "they have become best practice" to something like "the three argument open has become a best practice".

Replies are listed 'Best First'.
Re^2: "open" Best Practices
by haukex (Archbishop) on Jul 13, 2019 at 06:13 UTC

    I thought about how to make it more clear without repeating myself too much, so I hope I've improved the wording now. Thank you for pointing this out!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-03-28 19:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found