Regular Expression Perl

while(){
    print if s/[A-Z].*y/Tom/;
}
__DATA__
    Mary 101
    Tom 201