use Attribute::Handlers; sub foreach :ATTR { print "Just another Perl hacker,\n"; } sub foo :foreach {} foo(); #### use Attribute::Handlers; sub for :ATTR { print "Just another Perl hacker,\n"; } sub foo :for {} foo();