ubuntu jaunty seized up
Carl Friis-Hansen
ubuntuuser at carl-fh.com
Mon May 4 20:01:25 UTC 2009
Smoot Carl-Mitchell wrote:
> #! /usr/bin/perl -w
>
> # Array grows without bound (slowly)
>
> my @x = ();
>
> my $i = 0;
>
> while (1) {
> sleep 1;
> $x[$i] = $i;
> }
Nice explanation, but I think you need to increase the index:
$x[$i++] = $i;
or something.
--
+---------------------------------+-------------------+
| Carl Friis-Hansen | Fiskeryd Nybygget |
| http://computingconfidence.com/ | 341 91 Ljungby |
| Phone: +46 (0)372 15033 | Sweden |
+---------------------------------+-------------------+
More information about the ubuntu-users
mailing list