NAME
Array::RemoveElements - remove named elements from an array
VERSION
Version 0.01
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}) {
...
}
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
The following function is exported:
FUNCTIONS
remove_elements
This function receives two array-references. Any element, which is found in 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 debuggung-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:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Array-RemoveElements
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
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.