i am working on a larger program where i am having an error due to the above problem. Please if anyone knows a way i can match this without changing my input argument or the temp.mine file let me know asap. Thanks Warisuse strict; my $var1 = $ARGV[0]; print $var1."\n"; open(IN, "temp.mine") or die "Error opening temp.mine\n"; while(<IN>) { my $line = $_; print "input = $line\n"; if($line =~ /$var1/m) { print "found \n"; close(IN) or die "Error closing file\n"; exit 0; } } close(IN) or die "Error closing temp.mine\n"; print "not found \n"; #contents of file temp.mine #a+b
In reply to matching + character in a file by jalebie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |