Help for this page

Select Code to Download


  1. or download this
        my $foo = some_func();
        if ('ARRAY' eq ref $foo) {
            push @data => @$foo;
    ...
        else {
            push @data => $foo;
        }
    
  2. or download this
        my $foo = some_func();
        push @data => @$foo;
    
  3. or download this
        sub some_func {
            my $self = shift;
            my @data = 'ARRAY' eq ref $_[0]
    ...
                : @_;
            # do stuff
        }