in reply to Changing $/ mid-file

{local $/ = "aaaa\n"; <FILE> } {local $/ = "%"; while( <FILE> ){ } }

Replies are listed 'Best First'.
Re: Changing $/ mid-file
by dkubb (Deacon) on Jan 17, 2001 at 07:30 UTC
    There's no need to localize $/ twice, if you combine your code into a single block:
    { local $/ = "aaaa\n"; <FILE>; $/ = '%'; while( <FILE> ) { #do something here } }