Lightning flashed, thunder crashed and "FIEDRICH,JAMIE (HP-USA,ex1)" <jamie_fie
[EMAIL PROTECTED]> whispered:
| I have a text file in which I want to find a specific string - call it a
| heading. Once I've found the string (heading), I want to stuff the next
| line (content) into a variable.
Something like this would work for you:
while (<FILE>) {
if (/heading/) {
$variable = <FILE>;
}
}
-spp
--
Stephen P Potter [EMAIL PROTECTED]
"You can't just magically invoke Larry and expect that to prove your point.
Or prove that you have a point." -Simon Cozens
UNIX and Perl Consulting and Training http://www.unixlabs.net/~spp/