If I enter the alphabet h in together with the perl filname.pl command in Terminal ( perl filename.pl h ), it doesn't work.
It only works if I do it separately. perl filename.pl
h
How do I make it work if I enter both together on the same line ?
Thanks :)
#!/usr/bin/perl –w
chomp(my $user_value = <STDIN>);
if ($user_value eq "h") {
print " hi \n";
}