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

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -