$ cat test.pl
#!/pro/bin/perl
use strict;
use warnings;
my $file = "/tmp/test20.pl";
-e $file and print "$file EXISTS!\n";
print "$0 \n";
- e $file and print "$file WILD!\n";
$ perl test.pl
test.pl
Can't call method "e" without a package or object reference at test.pl
+ line 10.
$
versus
$ cat test.pl
#!/pro/bin/perl
use strict;
use warnings;
my $file = "/tmp/test20.pl";
-e $file and print "$file EXISTS!\n";
print "$0 \n";
- e ($file) and print "$file WILD!\n";
$ perl test.pl
test.pl
Undefined subroutine &main::e called at test.pl line 10.
Enjoy, Have FUN! H.Merijn
|