in reply to Re: Suggestions for optimizing this code...
in thread Suggestions for optimizing this code...

Is there no way to not use $rec and instead to split the record up within the sysread itself? eg: Something akin to:-

sysread(DF, split(/(?=\n)/,$[0]), -s DF);

I'm sure that's jibberish, but you get the idea...

Replies are listed 'Best First'.
Re^3: Suggestions for optimizing this code...
by Aristotle (Chancellor) on Jan 17, 2006 at 11:11 UTC

    No. sysread is there for when you want large chunks of data and need to read them unbuffered. Noone does that when they need to process data line-wise – well, unless they are forced to operate under cartoonishly arbitrary and nonsensical constraints like “minimise the number of syscalls.”

    Seriously, what your hoster is asking of you makes no sense at all.

    Makeshifts last the longest.