Re: when to use & to call subroutine
[In reply to]
Can't Post
Hi
in perl5 the & was made optional if it looks like a sub call with parens. without parens it is a bareword and needs to be declared in advance sothe compiler can parse it as a sub call.
in perl4 the only way to call a sub was with &. you can still use & in perl5 for a bareword call like &foo but most prefer to do foo() these days. so & is not needed except for some special cases