# was if (!($line =~ /\s*[a-qs-zA-Z]/)) # equivalent to (as noted by dragonchild) unless ($line =~ /[a-qs-zA-Z]/) # should have been IMHO unless ($line =~ /^\s*[a-qs-zA-Z]/) # which is equivalent to (with assumption 'textfile') if ($line =~ /^\s*r/)