$str =~ $qr; print "$1, $2\n"; # or whatever