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