c:\@Work\Perl\monks>perl -wMstrict -le "$_ = 'This is not an exit'; ;; if (my ($regex) = /This is/g) { print qq{matched, captured '$regex'}; } " matched, captured 'This is'