Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Both return the same value. I was curious if one method was preferred over another and for what reasons.my $retone=Send->temp(); my $obj=new Send; my $ret=$obj->temp(); package Send; sub temp { return "temp"; } print "one, $retone, two, $ret\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) Re: Calling Subs
by jeffa (Bishop) on Jan 17, 2001 at 01:35 UTC | |
|
Re: Calling Subs
by chipmunk (Parson) on Jan 17, 2001 at 01:40 UTC |