Help for this page

Select Code to Download


  1. or download this
    $scalar = (5,10,15,20);
    print $scalar, "\n";
    
  2. or download this
    sub get_list
    {
        # return a list if a list is wanted, else 
        # return the string
        return wantarray ? (5,10,15,20) : "SCALAR CALL";
    }
    
  3. or download this
    $scalar = get_list();
    print $scalar, "\n";
    
    @array = get_list();
    print join(" ", @array), "\n";
    
  4. or download this
    print scalar(get_list()), "\n";
    print join(" ", get_list()), "\n";