I\'m grabbing a few columns from a tab delineated file in Perl. The first line of the file is completely different from the other lines, so I\'d like to skip that line as fast a
I always use $. (current line number) to achieve this:
#!/usr/bin/perl
use strict;
use warnings;
open my $fh, '<', 'myfile.txt' or die "$!\n";
while (<$fh>) {
next if $. < 2; # Skip first line
# Do stuff with subsequent lines
}