print $1 if $line =~ m//) { print "joe:\n"; $user = $1; last; } } print "user = $user\n";