in reply to Writing compact conditional regex's

An expert would probably use map here and your data might require both regexes but I would write it something like this:
our $dir = `dir $movies\\*.avi /s`; our $inv; @_ = $dir =~ /,\d{3} ((.*?)\.avi)/gi; for (@_) { $inv->{$1} = $2 if /(.*?)s?(\d{1,2}[ex]\d{1,2})/i }