Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

How do I delete a file?

by vroom (Pope)
on Jan 08, 2000 at 08:46 UTC ( #1883=perlquestion: print w/replies, xml ) Need Help??

vroom has asked for the wisdom of the Perl Monks concerning the following question:

Replies are listed 'Best First'.
Re: How do I delete a file?
by Anonymous Monk on Feb 14, 2000 at 05:16 UTC
    With unlink:
    # unlink returns the number of files it successfully deleted $cnt = unlink 'a', 'b', 'c'; if (unlink @goners == @goners){ print "I deleted 'em all! HaHaHa\n"; } unlink <*.bak>; unlink $filename or die "Couldn't delete $filename: $!";

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2021-04-21 06:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?