in reply to Conditional question

Details matter :)  Try this:

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