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."; }
In reply to Re: Conditional question
by almut
in thread Conditional question
by Mr.Clean
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |