in reply to grepping for

If it is a standard log file, it will not have host and protocol information. Try something like this:
$dir = "/acm/"; ## avoid worrying about escaping slashes if (m/($dir.*) /) { print "The path is $1!\n"; }
Your first method should work, by the way. Perhaps give us an example line from the log file and what result you get?