Limbic~Region has asked for the wisdom of the Perl Monks concerning the following question:
I just can't figure out why perl didn't throw any errors or warnings. Running it through perl -MO=Deparse didn't turn up anything. Changing splice(@$, 0, 1) to splice(@$_, 0, 1) produces the correct result. This is AS perl 5.10.0#!/usr/bin/perl use strict; use warnings; my @list = map {[qw/foo bar blah baz/]} 1 .. 5; splice(@$, 0, 1) for @list;
What am I missing?
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Is this a bug in splice?
by tilly (Archbishop) on Feb 20, 2008 at 03:11 UTC | |
by Limbic~Region (Chancellor) on Feb 20, 2008 at 03:22 UTC | |
by tilly (Archbishop) on Feb 20, 2008 at 03:27 UTC | |
by Limbic~Region (Chancellor) on Feb 20, 2008 at 03:35 UTC | |
|
Re: Is this a bug in splice?
by ikegami (Patriarch) on Feb 20, 2008 at 02:32 UTC | |
by Limbic~Region (Chancellor) on Feb 20, 2008 at 02:48 UTC | |
by ikegami (Patriarch) on Feb 20, 2008 at 04:36 UTC | |
by Limbic~Region (Chancellor) on Feb 20, 2008 at 13:26 UTC | |
|
Re: Is this a bug in splice?
by BrowserUk (Patriarch) on Feb 20, 2008 at 02:47 UTC | |
by ikegami (Patriarch) on Feb 20, 2008 at 04:46 UTC | |
by BrowserUk (Patriarch) on Feb 20, 2008 at 07:51 UTC |