in reply to Re: Re: weird perl verion and/or OS problem with newlines
in thread weird perl verion and/or OS problem with newlines
<IN>; # skip "--start of file--" while( <IN> ) { if( $_ eq "#:lav\n" ) { local $/= "#:eof\n"; my $block= <IN>; # ... process $block here ... } elsif( $_ eq /^--end of file--/ ) { warn "Unexpected line: $_"; } }
Updated: Thanks to graff for noting that I wrote $\ when I meant $/.
- tye
|
|---|