in reply to Re: calling f(arg1,arg2,arg3) better than &f
in thread calling f(arg1,arg2,arg3) better than &f
So my question: is this a strong case for using &?sub lock{ my ($file)=@_; print " user defined lock\n"; } sub link{ my ($text, $url) =@_; print " user defined link $text $url\n"; } print "calling lock: ".lock; #calls locl, built-in lock hidden; print "calling &lock: ".&lock; # calls user defined lock print "calling &link: ".&link("123","123"); # user defined link print "calling &link: ".&link; #user defined won't print 123 print "calling link: ".link("123","123"); # built-in link
|
|---|