Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: file duplication error

by vek (Prior)
on Feb 02, 2005 at 05:24 UTC ( [id://427154]=note: print w/replies, xml ) Need Help??


in reply to file duplication error

This really has nothing to do with the problem at hand but I just wanted to add an observation.

open (fileReadWrite,"../Rules1.txt");
Always check the return value of open() and react accordingly:
open(FILEREADWRITE, "../Rules1.txt") || die "Could not open Rules1.txt + - $!\n";
You are reading the entire file into memory here:
my @dataRead = <fileReadWrite>;
Which is ok for small files but might bite you if you try that with huge files.

-- vek --

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://427154]
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: (4)
As of 2024-04-25 07:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found