On 11/10/2006 09:01 AM, Tony Heal wrote:
OK, the has to be an easy way to call one script OR another from within
another, but I would like suggestions, as this does not work because there
is no RegEx to put from here.

#!/usr/bin/perl

if ( -f '/usr/local/custom/backup.pl' || '/usr/local/custom/backup.sh' ) {
system ("$&"); }



my $filename = ...
if ($filename =~ m{^(/usr/local/custom/backup.(pl|sh))$}) {
    -f $1 && system($1);
}



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to