c:\@Work\Perl>perl -wMstrict -le "print qq{perl version $]}; ;; my %h = qw(foo ZOT); ;; $_ = 'foo'; ;; print qq{before rx: '$_'}; my $rx = qr{ \A \s* (??{ print qq{in rx: '$_'}; $_; }) }xms; ;; print qq{before match: '$_'}; print 'match' if $h{'foo'} =~ $rx; print qq{after match; '$_'}; " perl version 5.008009 before rx: 'foo' before match: 'foo' in rx: 'ZOT' match after match; 'foo'