Using the while (<>) construction takes a file from the command line and parses each individual line of the file (up to the \n). How do I 'peek' at the next line in the file without losing my current place? Doing something like:
my $nextLine = <>
would skip the current line, but all I want to do is check the next line for before processing the current line.
I have written all sorts of convoluted test code, trying to fiddle with line numbers, the @ARGV array, the $_ variable, but nothing has worked so far.
Many thanks for your help.