If you're reading your file line by line, i.e. if $line only ever contains one line, then a regular expression can't help you. The easiest way to see the second line of the file is to read two lines and discard the first, e.g. by saying
<$FILE>; my $line = <$FILE>;
But there's probably a reason you want to use a regular expression instead of doing this, so - what are your constraints, and what are you trying to do?
In reply to Re: regex multi-line
by AppleFritter
in thread regex multi-line
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |