#!/usr/bin/perl use strict; use warnings; my $name; my $upto; my @response = ("That's interesting.","Eh, boring...","Ugh.","Cool! Keep up the good work!"); sub april { print "Hi, my name is April! What's yours? "; chomp($name = ); print "Hi ", $name, ", nice to meet you! What are you up to? "; for (;;) { chomp($upto = ); $upto eq "nothing" and last; print $response[rand @response], "\n"; print "Anything else? "; } print "Goodbye, $name!\n"; } april();