Calling a subroutine

A subroutine can be called in either of the following ways:

&print_headers;
print_headers();

If (for some reason) you've got a subroutine that clashes with a reserved function or something, you will need to prefix your function name with & (ampersand) to be perfectly clear. You should avoid doing this anyway; overloading built-in functions can cause more confusion than it's worth.

There are other times when you need to use an ampersand on your subroutine name, such as when a function needs a SUBROUTINE type of parameter, or when making an anonymous subroutine reference.