Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: opening new file in different directory

by buckaduck (Chaplain)
on Oct 24, 2001 at 00:55 UTC ( [id://120908]=note: print w/replies, xml ) Need Help??


in reply to opening new file in different directory

How about one more layer of error checking, on the chdir command:
chdir "/home/main/sub/newfiles" or die $!; open(WRITE, ">$file") or die "Can't open $file: $!";
That is, just because the program runs, doesn't mean it's working correctly. It's possible that the chdir fails and the open is creating a file in the current directory. It's worth checking, anyway...

buckaduck

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-24 16:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found