#!usr/bin/perl use strict; # perldoc strict use warnings; # perldoc warnings print "type hw to print hello world script!\n:> "; my $cmd = ; chomp($cmd); # perldoc -f chomp if ( $cmd eq "hw" ){ # does $cmd contain hw? print "Hello, world"; }else{ print "sorry I didn't understand the command."; }