Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

opening new file in different directory

by George_Sherston (Vicar)
on Oct 23, 2001 at 18:42 UTC ( [id://120797]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    open (READ, "/home/main/sub/oldfiles/$file") or die "could not open /home/main/sub/oldfiles/$file $!";
  2. or download this
    open (READ, "../sub/oldfiles/$file") or die "could not open ../sub/oldfiles/$file $!";
  3. or download this
    open (READ, ">/home/main/sub/newfiles/$file") or die "could not open /
    +home/main/sub/newfiles/$file $!";
    
  4. or download this
    chdir "/home/main/sub/newfiles";
    open (WRITE,">$file") or die "could not open $file $!";
    # write stuff
    chdir "/home/main/cgi-bin";
    

Log In?
Username:
Password:

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

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

    No recent polls found