Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Empty List miracle (2)

by Sandy (Curate)
on Apr 29, 2010 at 14:20 UTC ( [id://837549]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub empty_list {
      return @{ [] }
    ...
    my @y=(empty_list())[0];
    my $x = (empty_list())[0];
    use Data::Dumper;print Dumper \$x,\@y;
    
  2. or download this
    my @y=(empty_list())[0];  # @y = ();
    my $x = (empty_list())[0];  # $x = undef;
    
    my %x = (foo=>$x);
    my %xx = (foo=>@y);
    
  3. or download this
    my %x=(foo=>scalar((empty_list1())[0]));
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://837549]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-25 08:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found