in reply to Re^2: Is there any way to override "file test operator"?
in thread Is there any way to override "file test operator"?
#!usr/bin/perl -w use strict; my $file = 'C:\temp\test20.pl'; if ( -e $file) { print "$file EXISTS!\n"; } print "$0 \n"; if ( - e $file) #this does not work! { print "$file WILD!\n"; } __END__ Can't locate object method "e" via package "C:\temp\test20.pl" (perhaps you forgot to load "C:\temp\test20.pl"?) at C:\TEMP\test20.pl line 13. C:\temp\test20.pl EXISTS! C:\TEMP\test20.pl
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Is there any way to override "file test operator"?
by Tux (Canon) on Aug 09, 2011 at 08:04 UTC |