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

Any reason you couldn't do this?

sub trash { my ($o, $item) = @_; eval ( ( -d $item ) ? rmtree ( $item ) : unlink ( $item ) ); $o->log ( 'error', "$item": $@" ) if ( $@ ); }
--t. alex
but my friends call me T.

Replies are listed 'Best First'.
Re: Re: My first thought was to build a macro... was I right?
by princepawn (Parson) on Dec 03, 2002 at 15:52 UTC
    Any reason you couldn't do this?
    good suggestion! thanks

    Carter's compass: I know I'm on the right track when by deleting something, I'm adding functionality