in reply to Re: Perl scripts slowing down towards end of file processing
in thread Perl scripts slowing down towards end of file processing

You might want to considered changing your input loop to look something like this.
# tell perl to make the input record separator the character with hex +value '0c' $/ = pack('c',0x0c); while(<IN>) { my @temp = split(/\n/,$_); # rest of processing }
This would save you the byte by byte read and the string concatination for every record. Should be quite a bit faster.

/\/\averick

Replies are listed 'Best First'.
Re: Re: Re: Perl scripts slowing down towards end of file processing
by JPaul (Hermit) on Jul 14, 2001 at 01:40 UTC
    Well hell,
    What took 11 minutes to process (byte-by-byte) now takes 16 seconds. I crap you not.

    I'd better remember that, thanks Mav.

    JP
    -- Alexander Widdlemouse undid his bellybutton and his bum dropped off --