if ( $current_text =~ s/$some_regex// ) { ( $a, $b, $c ) = ( $1, $2, $3 ); # do something useful next READ_MORE_DATA }