use Sys::Hostname; my $hn = hostname(); [download]
In reply to Re: Passing variables into regular expressions by japhy in thread Passing variables into regular expressions by wanderer