Just be careful you don't shadow one of your packages with a sub of the same name.
use strict; use warnings; package Foo; sub bar { print "Foo::bar\n"; } package Bar; sub bar { print "Bar::bar\n"; } package main; sub Foo { "Bar" } Foo->bar(); "Foo"->bar(); exit 0; __END__
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re^3: Parse error with subroutines and <
by Fletch
in thread Parse error with subroutines and <
by TedYoung
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |