Help for this page

Select Code to Download


  1. or download this
    my ($var,$rlist) = @_;
    
    ...
    foreach(@{$rlist}) {
        #do stuff
    }
    
  2. or download this
    my $var = shift;
    my @list = @{+shift};  
    # you cannot use @{shift}, the + operator tricks perl
    # into getting the value of shift first