I need to be able to test against a regular expression stored in a variable...#!/usr/bin/perl $dataline = "This is a line of data ISOLATION"; $regex = "m/ISOLATION/"; if ($dataline ~= $regex) { print "Found a match!\n"; } else { print "No match!\n"; }
In reply to Regex from a variable... by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |