in reply to save regex in a file?
There are a number of builtin ways to do this, partucularly if the regex is stored in perl syntax.
Each listed way has it's own conventions for getting a value out. The elegant way if to make the file a module:Usage:package VIR; our $vir = qr/My\s+[Rr]egex/; 1;
Each listed way has it's own conventions for getting a value out.#!/usr/bin/perl -w use strict; use lib '/location/of/lib/'; use VIR; $_="My regexen"; print "found\n" if m/$VIR::vir/;
After Compline,
Zaxo
|
|---|