Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: My first thought was to build a macro... was I right?

by Sifmole (Chaplain)
on Dec 03, 2002 at 15:46 UTC ( #217254=note: print w/replies, xml ) Need Help??


in reply to My first thought was to build a macro... was I right?

A thought:
sub rmtree { trashIt(@_, "rmtree"); } sub unlink { trashIt(@_, "unlink"); } sub trashIt { my ($o, $file, $cmd) = @_; eval { $cmd $file } ; if ($@) { $o->LOG('error', "$file: $@"); } }
And I am sure you could do something with closures....

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://217254]
help
Chatterbox?
[1nickt]: Sad that so much of our humour these days is dry, wry, gallows humor :-/
[1nickt]: One of the great human characteristics .... to laugh in the face of doom :-)

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2017-03-26 19:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (315 votes). Check out past polls.