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