$_ = "xabcy\n"; print if /abc/; # Could be written: print $_ if $_ =~ /abc/;