First value passed to pass() is a reference to $obj.sub pass{ my ( $problem1 )= @_; # <-- Your mistake is here print "$problem1\n"; }
sub pass{ my ( $self, $problem1 )= @_; print "$problem1\n"; }
In reply to Re: two problems about passing var between classes
by perlplexer
in thread two problems about passing var between classes
by benlaw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |