Hi again Gurus!
I am trying to expand my understanding of perl. i do not understand why
the first test fails and the latter two succeed. shouldn't the first
succeed as well?
-Josh
code:
#!/usr/bin/perl
use strict;
# doesn't work
if(-e "%systemdrive%\\servicedisk\\tools\\seachange\\SeaPatch.exe"){ print
"yes\n"; }else{ print "no\n"; }
# work on either versions
my $sysdir=`%systemdrive%`;
my $file ="$sysdir\\servicedisk\\tools\\seachange\\SeaPatch.exe";
if(-e $file){ print "yes\n"; }else{ print "no\n"; }
if(-e "$sysdir\\servicedisk\\tools\\seachange\\SeaPatch.exe"){ print
"yes\n"; }else{ print "no\n"; }
-----------------------------------------
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs