Sergei A. Fedorov > Array-Utils-0.3 > Array::Utils

Download:
Array/Array-Utils-0.3.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  0
View/Report Bugs
Module Version: 0.3   Source   Latest Release: Array-Utils-0.5

NAME ^

Array::Utils - small utils for array manipulation

SYNOPSIS ^

        use Array::Utils qw(:all);
        
        my @a = qw( a b c d );
        my @b = qw( c d e f );

        # symmetric difference
        my @diff = array_diff(@a, @b);

        # intersection
        my @isect = intersect(@a, @b);
        
        # unique union
        my @unique = unique(@a, @b);
        
        # check if arrays contain same members
        
        if ( !array_diff(@a, @b) ) {
                # do something
        }

DESCRIPTION ^

A small pure-perl module containing list manipulation routines. The module emerged because I was tired to include same utility routines in numerous projects.

FUNCTIONS ^

unique

Returns an array of unique items in the arguments list.

intersect

Returns an intersection of two arrays passed as arguments.

array_diff

Return symmetric difference of two arrays passed as arguments.

BUGS ^

None known yet

AUTHOR ^

Sergei A. Fedorov <zmij@cpan.org>

I will be happy to have your feedback about the module.

COPYRIGHT ^

This module is Copyright (c) 2007 Sergei A. Fedorov. All rights reserved.

You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

WARRANTY ^

This is free software. IT COMES WITHOUT WARRANTY OF ANY KIND.

syntax highlighting: