#!/usr/bin/perl print "type hw to print hello world script!"; my $cmd = ; chomp $cmd; # get rid of trailing newline if ( $cmd eq 'hw' ) { print "Hello, world"; } else { print "sorry I didn't understand the command."; }