in reply to Re: Invalid sub ignored on use strict;
in thread Invalid sub ignored on use strict;
$ 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
|
|---|