and test code:package myObj; use strict; sub new { return bless {}, $_[0]; } sub one { print "One\n"; } sub two { print "Two\n"; } sub three { print "Three\n"; } 1;
HTH#!/usr/bin/perl -w use strict; use lib "."; use myObj; my $s = myObj->new(); my @cmd = qw( one two three ); foreach (@cmd) { $s->$_(); }
In reply to Re: use slack;
by steveAZ98
in thread use slack;
by epoptai
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |