[comp.lang.perl] Bug with do inside eval?

tony@oha.UUCP (Tony Olekshy) (03/27/90)

Program:
    print "Test 1\n"; do "ioctl.pl";
    print "Test 2\n"; eval `cat /sys/perl/lib/ioctl.pl`;
    print "Test 3\n"; eval "do 'ioctl.pl'";
    print "Done\n";

Output:
    Test 1
    Test 2
    Test 3
    Unrecognized character \37777777614 ignored at /sys/perl/lib/ line 1.
    Unrecognized character \37777777664 ignored at /sys/perl/lib/ line 1.
    Unrecognized character \005 ignored at /sys/perl/lib/ line 1.
    Unrecognized character \37777777604 ignored at /sys/perl/lib/ line 1.
    sh: 10635 Memory fault - core dumped

Stack Traceback:
    _cmd_exec(0x18ae578, 0x0, 0xffffffff)	from _do_eval+0x4b1
    _do_eval()	from _eval+0x4950
    _eval(0x188f160, 0x0, 0xffffffff)	from _cmd_exec+0xe37
    _cmd_exec(0x188eccc, 0x0, 0xffffffff)	from _main+0x1079
    _main(0x1, 0x187eca0, 0x187eca8)	from __start+0x39
    __start()	from start0+0xc

Version:
    $Header: perly.c,v 3.0.1.4 90/02/28 18:06:41 lwall Locked $
    Patch level: 15

Configuration:
    sysname=XENIX release=2.3.1 machine=i80386
--
Yours, etc., Tony Olekshy (...!alberta!oha!tony or tony@oha.UUCP).

lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) (03/28/90)

In article <412@oha.UUCP> tony@oha.UUCP writes:
: Program:
:     print "Test 1\n"; do "ioctl.pl";
:     print "Test 2\n"; eval `cat /sys/perl/lib/ioctl.pl`;
:     print "Test 3\n"; eval "do 'ioctl.pl'";
:     print "Done\n";
: 
: Output:
:     Test 1
:     Test 2
:     Test 3
:     Unrecognized character \37777777614 ignored at /sys/perl/lib/ line 1.
:     Unrecognized character \37777777664 ignored at /sys/perl/lib/ line 1.
:     Unrecognized character \005 ignored at /sys/perl/lib/ line 1.
:     Unrecognized character \37777777604 ignored at /sys/perl/lib/ line 1.
:     sh: 10635 Memory fault - core dumped

Already fixed for patch 16.  Hopefully out later today.

On the other hand,

	Spring is sprung, the grass is ris'
	Where last year's reckless driver is.

Larry