DB<5> print "x".NAME # bareword treated as string xNAME DB<6> sub NAME {42} # sub declaration DB<7> print "x".NAME # bareword now known to be s +ub x42 DB<8> print "x".NAME2() # explicit sub call Undefined subroutine &main::NAME2 called at (eval 17)[C:/Perl_524/lib/ +perl5db.pl:737] line 2. DB<9> print "x".&NAME2 # explicit sub call Undefined subroutine &main::NAME2 called at (eval 18)[C:/Perl_524/lib/ +perl5db.pl:737] line 2. DB<10>
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
In reply to Re^2: New Discovery!!! (sub call without parentheses)
by LanX
in thread New Discovery!!! (sub call without parentheses)
by harangzsolt33
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |