Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: help with my unlink

by mt2k (Hermit)
on May 05, 2002 at 21:34 UTC ( [id://164175]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    open(THING, "$Form{'han'}.txt");
    #so far, you have nothing here
    #code some stuff to deal with the file
    close(THING);
    unlink "$Form{'han'}.txt" or die "Couldn't delete $Form{'han'}.txt: $!
    +";
    
  2. or download this
    {
    open NAMES, "$Form{han}.txt" or die "Oh my. File open failed: $!\n";
    ...
    #Delete the file if you want to...
    unlink "$Form{han}.txt" or die "Couldn't delete the data file: $!\n";
    }
    
  3. or download this
    open(THING, "$Form{'han'}.txt");
    unlink <THING>;
    close(THING);
    unlink "$Form{'han'}.txt" or die "Couldn't delete $Form{'han'}.txt: $!
    +";
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-25 12:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found