Help for this page

Select Code to Download


  1. or download this
    sub clone {
        my $ref = shift;
    ...
        ref( $ref ) eq 'HASH'   and return { map+( $_, clone( $ref->{$_} )
    +), keys %{ $ref } };
        ref( $ref ) eq 'ARRAY'  and return [ map clone( $ref->[$_] ), 0 ..
    + $#{ $ref } ];
    }