while (my $data = $ss->getNextRow()) { # skip lines until we find column header "Last Name" in first column next if $data[0] eq 'Last Name'; ... stuff ... } #### while (my $data = $ss->getNextRow()) { # skip lines until we find a non-blank row next unless grep { ! /^\s+$/ } @$data; ... stuff ... } #### while (my $data = $ss->getNextRow()) { # skip lines unless they have the right number of columns next unless $expected_columns == @$data; ... stuff ... }