The way I read the perldoc, a constant is "a subroutine with an empty prototype" which never changes its return value! There is a clear difference: compare
withsub foo () { 17 }
Deparsing use of both functions in code shows a clear difference in the way Perl treats each one.sub bar () { rand(10) }
In reply to Re: •Re: Is it possible to distinguish contstants from normal subs?
by ariels
in thread Is it possible to distinguish contstants from normal subs?
by samtregar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |