At 4:47 PM -0800 1997.11.20, Jon Jacob wrote: > >{ > print "Enter number to add up (999 to quit): "; > chomp($a = <STDIN>); > last if $a eq "999"; > $b += $a; > redo; >} > I'm also a newbie learning Perl. I had a similar problem as described by Jon. Here's my script # This script is supposed to demonstrate # a loop with a middle gate. # It doesn't work here. I don't know why. $n=0; {$n++; if ($n > 5) {last;} print ($n "\n"); redo; } It freezes the mac sometimes. I'm running a fresh copy of 5.1.5r4, MacOS8. Also, when I read-in a very large file (6M) while MacPerl is assigned 14M, itran out of memory and sometimes freeze the mac dead. The file reading I'm using is $n=0; while (<FILEHANDLE>) { @a[$n++]=$_; }; There are probably better ways... More detailed description and steps on the crash available upon request. Xah, xah@best.com http://www.best.com/~xah/Wallpaper_dir/c0_WallPaper.html Mountain View, CA, USA ***** Want to unsubscribe from this list? ***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch