Perl wont recognize my if statement -
my code:
#!/usr/bin/perl $line = <stdin>; if ($line eq "/n") { print "that blank line!"; } else { print "that line of input was: $line"; } it wont recognize when $line in empty or /n. output "that line of input was:" , nothing, empty. print text if $line something.
it's "\n" create newline.
Comments
Post a Comment