Jair Santos wrote:
>
> > That is because "= =" is a syntax error, it should be "==" with no
> > whitespace between the two equals signs. Since the expression is in a
> > boolean context the "== 0" part can be omitted and it will do the same
> > thing.
>
> Thats ok, but it was NOT a sintax error. The script was running properly
> with the = = (including the space) but returning wrong results because
> the test was failing.
$ perl -le'
sub IsDir { return 1 }
if ( IsDir() = = 1 ) { print "true" }
else { print "false" }
'
syntax error at -e line 3, near "= ="
Execution of -e aborted due to compilation errors.
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]