Running it gives#! /usr/bin/perl while(<DATA>) { chomp($_) ; if ( $_ == "aaaa" ) { print "$_\n" ; } else { print "OK\n" ; } } __DATA__ aaaa bbbb cccc dddd
I expectedaaaa bbbb cccc dddd
Any help would be appreciated!aaaa OK OK OK
In reply to if statement not working by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |