BrowserUk has asked for the wisdom of the Perl Monks concerning the following question:
Update: WAD := Working As Designed.
Why is this legal (no error produced):
C:\test>perl -Mstrict -wle" my $r = undef; my @x = map{ $_ } @{ $r }"
But this not?
C:\test>perl -Mstrict -wle" my $r = undef; my @x = @{ $r }" Can't use an undefined value as an ARRAY reference at -e line 1.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Dereferencing undef as an array: Bug or WAD?
by ikegami (Patriarch) on Jun 04, 2008 at 05:24 UTC | |
by BrowserUk (Patriarch) on Jun 04, 2008 at 06:02 UTC | |
Re: Dereferencing undef as an array: Bug or WAD? (autovivification)
by almut (Canon) on Jun 04, 2008 at 10:02 UTC | |
Re: Dereferencing undef as an array: Bug or WAD?
by casiano (Pilgrim) on Jun 04, 2008 at 09:07 UTC | |
by BrowserUk (Patriarch) on Jun 04, 2008 at 14:01 UTC | |
by ChemBoy (Priest) on Jun 04, 2008 at 15:06 UTC |