in reply to Regex matching after ASCII characters
$file =~ m{ \A [A-Z]{6} [A-Z0-9]{2} $prompt_host }xms;
But it wouldn't be a bad idea to do some sanity checks on $prompt_host before randomly injecting user entered text into your regexp.
In Section
Seekers of Perl Wisdom