"1234"=~/(\d)/; print "$1\n"; "1234"=~/34/; print "$1\n"; print "undef\n" if ! defined $1;