#!/usr/bin/perl -w use strict; while (<MYFILE>){ s/\s+$//; if (/NEXT LINE MARKER/) { my $nextLine = <MYFILE>; $nextLine =~ s/\s+$//; print "$nextLine\n"; # do stuff with the next line here. } }
In reply to Re^3: Matching string, then getting next line
by inman
in thread Matching string, then getting next line
by minixman
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |