(The above code has been tested on Perl 5.8.0/Solaris9)package Foo; sub foo { print "Foo\n"; } sub bar { print "Bar\n"; } sub new { bless {}, shift } package main; my $foo = Foo->new; foreach my $method (qw( foo bar )) { $foo->$method; }
------
We are the carpenters and bricklayers of the Information Age.
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
In reply to Re: $var as accessor name?
by dragonchild
in thread $var as accessor name?
by matija
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |