$ perl -Mstrict -w (1==1) or dir( "hello" ); $ perl -Mstrict -w (1==0) or dir("hello"); Undefined subroutine &main::dir called at - line 1.
Luck's played a big part here and the conditional statement has never been exercised (unless of course dir is defined somewhere). The parens counter the 'use strict' which checks for the use of barewords as subs.
-derby
In reply to Re: Re: Invalid sub ignored on use strict;
by derby
in thread Invalid sub ignored on use strict;
by wil
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |