Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi I want to make a simple wrapper subroutine which delete a file and delete file.gz too.
sub unlink{# new unlink my $file_name=shift; unlink "$file_name"; #original unlink unlink "${file_name}.gz"; #original unlink }
How can I do this properly?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to wrap a subroutine
by AnomalousMonk (Archbishop) on Feb 06, 2015 at 00:00 UTC | |
|
Re: How to wrap a subroutine
by LanX (Saint) on Feb 05, 2015 at 23:57 UTC | |
|
Re: How to wrap a subroutine
by eyepopslikeamosquito (Archbishop) on Feb 06, 2015 at 07:00 UTC | |
|
Re: How to wrap a subroutine
by i5513 (Pilgrim) on Feb 06, 2015 at 07:44 UTC | |
|
Re: How to wrap a subroutine
by Anonymous Monk on Feb 05, 2015 at 23:34 UTC | |
|
Re: How to wrap a subroutine
by Anonymous Monk on Feb 05, 2015 at 23:58 UTC |