On Dec 30, 2003, at 10:55 AM, Eric Walker wrote:

No size is not an issue.  I am writing a compare routine and the file
has different sections that all need to be split up differently
depending on the section to parse out the key value pairs so I can
compare.

I bet that if you post a sample of this file and what you want to do with it, we can do good things.


my $last;
while (<>) {
        my $current = $_;

        # use $current and $last here
        # $last will be undef on first iteration

        $last = $_;
}

Should work fine though, even if you're changing the values in $current and $last.

James


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to