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

Re^3: Inserting a file inside of another

by ramlight (Friar)
on Feb 20, 2010 at 13:54 UTC ( #824377=note: print w/replies, xml ) Need Help??


in reply to Re^2: Inserting a file inside of another
in thread Inserting a file inside of another

If this is just a short throw-away script, there really is no problem with your file handles. However, I do not use them even on small scripts for several reasons.

First, it is good to get in the habit of using variables for file handles; they will stand you in good stead when you start writing larger and more complex programs.

Over time a small script may not stay small. The script may just need a slight modification to do something more, and then just another tiny improvement ...

Finally, I like to reuse code I've already written wherever I can. So small snippets of code tend to get plugged into larger scripts (where it makes sends to do so.)

  • Comment on Re^3: Inserting a file inside of another

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2023-12-07 14:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (32 votes). Check out past polls.

    Notices?