ybiC has asked for the wisdom of the Perl Monks concerning the following question:
Greetz fellow monks,
How can I replace the '-e' below with the $perm variable? I've tried tips from this (superficially similar) thread to no avail. Help?
cheers,
Don
striving toward Perl Adept
(it's pronounced "why-bick")
How can I replace the '-e' below with the $perm variable? I've tried tips from this (superficially similar) thread to no avail. Help?
sub FileCheck { my $file = $_[0]; my $perm = $_[1]; my $ooot = $_[2]; ## unless (-$perm $file) { unless (-e $file) { if ($ooot eq 'die') { die "\nError (fatal) accessing $file: $!"; } elsif ($ooot eq 'warn') { warn "\nError (non-fatal)accessing $file: $!"; } } }
cheers,
Don
striving toward Perl Adept
(it's pronounced "why-bick")
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: interpolation with filetest operators
by wog (Curate) on Dec 09, 2001 at 06:20 UTC | |
Re: interpolation with filetest operators
by Chmrr (Vicar) on Dec 09, 2001 at 06:08 UTC | |
Re (tilly) 1: interpolation with filetest operators
by tilly (Archbishop) on Dec 09, 2001 at 07:51 UTC | |
Re: interpolation with filetest operators
by Anonymous Monk on Dec 09, 2001 at 06:13 UTC | |
Re: interpolation with filetest operators
by Aighearach (Initiate) on Dec 09, 2001 at 06:16 UTC |
Back to
Seekers of Perl Wisdom