http://www.perlmonks.org?node_id=368350


in reply to Your favourite gory detail...

Not really weird, but I sometimes get caught being too fancy. I try to do a s///, and expect it to return the matches as a list. Sometimes I write this:
if ( ( $a, $b, $c ) = $current_text =~ s/$some_regex// ) { # do something useful next READ_MORE_DATA }
in a parserish way. Then I have that forehead-slapping moment, and change it to this:
if ( $current_text =~ s/$some_regex// ) { ( $a, $b, $c ) = ( $1, $2, $3 ); # do something useful next READ_MORE_DATA }

-QM
--
Quantum Mechanics: The dreams stuff is made of