Hi,
In the following example I have to print all the line from line "FROM" till
"END" not including the "FROM" line and the "END" line.
That is if the file consists from the following lines:
ds
FROM
1
2
3
34
5
6
END
dsa
I would like to print:
1
2
3
34
5
6
I would like to accomplish that with range operator. But the following script
will add the FROM ann the END line to the output.
Is there an efficient way to do that.
In other words I would like to have range operator that will return true for
all the line inside the range not including the first and last line.
BFN
Yaron Kahanovitch
#!/usr/bin/perl
while (<DATA>) {
print $_ if ( /FROM/ .. /END/ );
}
__END__
ds
FROM
1
2
3
34
5
6
END
dsa
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/