... die "oh no, it's not there!" unless find_pattern($file, $pattern); sub find_pattern { my ($file, $pattern) = @_; return `grep $pattern $file`; }