Help for this page

Select Code to Download


  1. or download this
    my ($x) = localtime();     # Example 4
    
  2. or download this
    my $x = () = localtime();
    
  3. or download this
    my ($x) = f();        # first element of list is assigned
    my $x = ( f() )[0];   # same, but overkill
    my $x = ( f() )[-1];  # last element of list is assigned
    my $x =  ( f() )[0]   # logical-or of the first elements
          || ( g() )[0];  #    returned by f() and by g()