Help for this page

Select Code to Download


  1. or download this
    my @x;
    sub foo :lvalue {
    ...
            return $x[0];
        }
    }
    
  2. or download this
    my @x;
    sub foo :lvalue {
    ...
        }
        $$lvalue;
    }
    
  3. or download this
    my @x;
    sub foo :lvalue {
    ...
        my $lvalue;
        ($cond) ? $x[$i] : $x[0];
    }
    
  4. or download this
    our @fields;
    BEGIN { @fields=qw(one two three) }