David Storrs writes:
> On Sat, Jul 03, 2004 at 01:02:34AM -0600, Luke Palmer wrote:
>
> > But indeed there are cases where it is a problem:
> >
> > my $x = 2;
> > sub mklist () {
> > return map { 2 * $_ } 0..10;
> > }
> >
> > my @list = mklist;
> > say @list[0..4];
On Sat, Jul 03, 2004 at 01:02:34AM -0600, Luke Palmer wrote:
> But indeed there are cases where it is a problem:
>
> my $x = 2;
> sub mklist () {
> return map { 2 * $_ } 0..10;
> }
>
> my @list = mklist;
> say @list[0..4]; # 0 2 4 6 8
> $x = 1;
> say @list;