print "What is your name?\n"; $input=; $name=inputcutter($input); # Be careful with that slash. You just escaped your # double-quote. print "What is your age?n\"; $input=; $age=inputcutter($input); # You don't have an array called @age in your code. # Try $age instead. print "Your are $name and your age is @age years old.\n"; sub inputcutter { # Here, you're neglecting to fetch the data you just # passed to here (in @_, FYI). If you do # $input = shift;, you'll grab the first element of # @_, which is what you need. # On this line, $s holds whether or not the chomp was # successful, not the chomped version of $input. You # can just chomp $input; and forget about $s. $s=chomp $input; return ($s); }