it's not nice to fiddle around with the global variable $/. This might affect other parts of the program, you should localise it before usage, in this case wrap your code in
I don't think this is working as you expect it to work. Where do you want to do something with the rest of the file? If you try to do this after the loop you will find that $data is undef (because the last value <FILE> returns is undef - which terminates the while loop). If you want to deal with $data within the loop you need some extra condition to find out whether you have the right piece of the file in $data or not.
-- Hofmator
Comment on Re: Re: doing something with the rest of a file after matching a keyword