Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; my $list = undef; my $item = $list->[0]; #ok my $list = get_no_list(); my $item = $list->[0]; #ok my $item = get_no_list()->[0]; #no way sub get_no_list { return; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: undefined value as an ARRAY reference sometimes ok
by ikegami (Patriarch) on Dec 14, 2011 at 06:47 UTC | |
|
Re: undefined value as an ARRAY reference sometimes ok
by chilledham (Friar) on Dec 13, 2011 at 23:13 UTC | |
by Anonymous Monk on Dec 13, 2011 at 23:52 UTC | |
by chilledham (Friar) on Dec 13, 2011 at 23:57 UTC | |
|
Re: undefined value as an ARRAY reference sometimes ok
by Anonymous Monk on Dec 14, 2011 at 00:31 UTC |