sub pass{ my ( $problem1 )= @_; # <-- Your mistake is here print "$problem1\n"; } #### sub pass{ my ( $self, $problem1 )= @_; print "$problem1\n"; }