in reply to Calling subs with &
Another difference I haven't seen mentioned yet is that within a sub, using &here (with the ampersand and without parentheses) will pass along the arguments in @_ to the here sub.
For example:
#!/usr/bin/perl -w use strict; test1("hello"); test2("hello"); sub test1 { &showargs; } sub test2 { &showargs(); } sub showargs { print "Got args @_\n"; } __END__ Got args hello Got args
|
|---|