foreach my $data ($fp->bundle_parseable_files->all->get_data) { # do something with each $data } #### sub AUTOLOAD { our $AUTOLOAD; my $self = shift; my @result = (); if (defined wantarray) { push @result, $$self->$AUTOLOAD(@_) while ($$self->next_file) } else { $$self->$AUTOLOAD(@_) while ($$self->next_file) } return wantarray ? @result : \@result; }