![]() |
|
Syntactic Confectionery Delight | |
PerlMonks |
Re: interpolation with filetest operatorsby wog (Curate) |
on Dec 09, 2001 at 06:20 UTC ( #130496=note: print w/replies, xml ) | Need Help?? |
Without resorting to string eval everytime you could use
a dispatch table to do this:
This also makes it relatively simple to create "new" filetests, should you want to... If you use eval "-$perm... I would advise checking $@ to see if you had an invalid filetest requested. update: added $_ => so it works. Much apologies. (Also s/exsits/exists/)
In Section
Seekers of Perl Wisdom
|
|