while () { chomp # same as chomp $_ if (/^#/) {....} # same as if ($_ =~ /^#/) { ....} }