in reply to Alternation in pattern matches

Good question. The answer is to use the magic $+ vaiable:

while( <DATA> ) { chomp; my ( $data ) = m/TAG:(\"([^\"]+)\"|([^\"\s]+))/ ? $+ : 'not_def'; print "$_ => $data\n"; }