Help for this page

Select Code to Download


  1. or download this
        @a = ()[1,0];           # @a has no elements
        @b = (@a)[0,1];         # @b has no elements
        @c = (0,1)[2,3];        # @c has no elements
    
  2. or download this
        @a = (1)[1,0];          # @a has two elements
        @b = (1,undef)[1,0,2];  # @b has three elements
    
  3. or download this
        while ( ($home, $user) = (getpwent)[7,0]) {
            printf "%-8s %s\n", $user, $home;
        }
    
  4. or download this
        while(  ( $home, $user )= @results[7,0]  ) {
            ...
        }
    
  5. or download this
        @c = (0,1)[2,3];        # @c has no elements
    
  6. or download this
        @d= (1,2,3)[9,1,8];  # @d= (undef,2,undef);