# Captures the filename from the middle of the string. # You might have incorrect results if parens are used in more than one place. ($file_name) = $string =~ /\((.*)\)/;