#!/usr/bin/perl -w use strict; use lib '/location/of/lib/'; use VIR; $_="My regexen"; print "found\n" if m/$VIR::vir/;