The first program prints 'yes' the second program prints 'no'. Two program differs in there condition checking. rest all same. could anyone explain me better.Program : I #!/usr/bin/perl use strict; my $a = "[abc][hij]"; my $b = " aj"; if ($b =~ /$a/) { print "yes"; } else { print "no"; } ________________________________________ Program : II my $a = "[abc][hij]"; my $b = " aj"; if ($a =~ /$b/) { print "yes"; } else { print "no"; }
In reply to same program different output by jesuashok
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |