...but every so often $ptsp possesses a [ or ], which messes up my pattern matching. How do I treat [ and ] as literal characters and not special characters?if ($rpt[$ln] =~ /^\sStartpoint/ { @ptlalsp = split(/\s+/,$rpt[$ln]); $ptsp = $ptlalsp[2]; #get name do { $ln++; } until ($rpt[$ln] =~ /$ptsp/); #name will show up #again...increment #$ln until found #other stuff... }
Thanks,
-Fiddler42
In reply to How to deal with [ and ] chars by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |