Data::Pipeline - manage aggregated data filters
use Data::Pipeline qw( Pipeline Truncate Count Array ); my $p = Pipeline( CSV, Truncate( length => 5 ), ); my $iterator = $p -> from( file => $filename ); until( $iterator -> finished ) { my $v = $iterator -> next; # get the first five items in a CSV file }
If combining the output of multiple pipelines:
use Data::Pipeline qw( Pipeline Union ); my $u = Union( Pipeline( ... ), Pipeline( ... ), ... ); my $iterator = $u -> transform( $source1, $source2, ... );
To install Data::Pipeline, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Pipeline
CPAN shell
perl -MCPAN -e shell install Data::Pipeline
For more information on module installation, please visit the detailed CPAN module installation guide.