in reply to Regex from string

Your double quotes are eating the \ before the paren. (and even if it weren't, you aren't escaping the close paren, and so it'd throw an error).

You can either use single quotes:

my $match = 'root \(hd[0-9],[0-9]\)';

or the 'qr' operator:

my $match = qr{root \(hd[0-9],[0-9]\)};

I vaguely remember someone mentioned a tool for testing regexes ... but I can't remember what it was, and I'm not having much luck w/ the super search