prints the expected, whileuse Attribute::Handlers; sub foreach :ATTR { print "Just another Perl hacker,\n"; } sub foo :foreach {} foo();
does not. I'll follow my own advice and send a perlbug.use Attribute::Handlers; sub for :ATTR { print "Just another Perl hacker,\n"; } sub foo :for {} foo();
In reply to Re^3: For vs. Foreach
by tilly
in thread For vs. Foreach
by mattford63
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |