[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] sys* behaviour changed in MacPerl 5.2.0r4



I've noticed that the sys* keywords' behaviour has changed in recent
MacPerl ports. This caused some mysterious bugs in scripts that used to
work, so a general warning is in place.

You can no longer intermix sysread with seek. It doesn't work any more. 

That wouldn't be that bad, just use sysseek instead, BUT: there is no
"tell" counterpart.

	#!perl
	# save as droplet, and drop a file on it
	$\ = "\n"; $, = ", ";
	open(FILE,shift); binmode(FILE);
	sysread(FILE,$_,100);
	sysseek FILE,200,0;
	print length, tell FILE;

This prints:

	100, 0

Not 100, not 200, but 0. Hurray.

	Bart.

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch