in reply to Storing Lines before and After pattern
open ($fh, "<poem") or die "Couldn't Open!"; $poem = do{ local $/; <$fh> }; ($before, $match, $after} = split /(DOG)/, $poem;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Storing Lines before and After pattern
by ysth (Canon) on Jan 27, 2004 at 01:09 UTC |