I am doing something rather simple - iterating over the lines from <> and splitting each one into words. What I can't seem to figure out how to do, is grab the first two words from the first line, and then continue on as usual. In other words, I want to my $first_line = <>; my ($word1, $word2) = split /\s+/, $first_line; while(<>){...} but still have the rest of $first_line be processed in the wile(<>).
Am I missing something obvious?
(Oh, I wouldn't want to slurp the whole thing into RAM first, as the input can get rather largish)
In reply to "uhshifting" the diamond? by glwtta
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |