in reply to I still can't get only the necessary lines from the file.
One problem is your regexp. Here's what it is saying:
Match if:
The "print unless..." statement should be as follows:
print unless ( /START context/ or /\* End context \*/ );
Another solution might be like this:
{ local $/ = "* End Context *\n"; while ( <DATA> ) { s/^START context//; my @info = split /\n/; chomp @info; print "$_\n" foreach @info }
Dave
|
|---|