Thanks for the reply. I used your recommendation to use qr but unfortunately it still has issues concerning to quotemeta related lines. My txt file is a combination of normal as well as quotemeta related lines. So at a time I am able to get output either for normal lines or quotemeta lines. Please correct me if I doing something wrong.
unless($line =~ qr/$pattern/){ ... #works only for normal lines unless($line =~ qr/\Q$pattern\E/){... #both normal as well as quotemet +a related lines are failing and everything is getting list in output.
Could you please let me know what is wrong step I am doing?
In reply to Re^2: unless condition not working
by perlavi
in thread unless condition not working
by perlavi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |