NAME

Array::RemoveElements - remove named elements from an array

VERSION

Version 0.02

SYNOPSIS

This module receives two arrays. All elements from the second array will be removed from the first if found there.

Example:

use Array::RemoveElements;

my $volumes = Array::remove_elements(\@all_volumes, \@excluded_volumes);
foreach my $vol (@{$volumes}) {
    # do something with the remaining volumes ...
}

This module has been developed to simplify the process of writing plugins for Nagios, where often a list of items to check is determined by the script, but several items should be excluded by means of --exclude.

EXPORT

Only one function is exported on request:

remove_elements

FUNCTIONS

remove_elements

This function receives two array-references. Any element from the second array, will be removed from the first. This is true, wether or not the elements are listed more than once.

The resulting array is returned by reference.

Debugging

An optional third argument can be used to turn on debugging-output. If set to something greater than 0, additional information is printed to stderr.

Example:

my $volumes = Array::remove_elements(\@all_volumes, \@excluded_volumes, 1);
... 

AUTHOR

Ingo LANTSCHNER, <perl [at] lantschner.name>

BUGS

Please report any bugs or feature requests to bug-array-removeelements at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Array-RemoveElements. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Array::RemoveElements

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2009 Ingo LANTSCHNER, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.