my @arr = (1..10); use Acme::BottomsUp; @arr # first, start w/ numbers grep { $_ % 2 } # then get the odd ones map { $_**3 } # then cube each one join ":", # and glue together print # lastly, display result ; print "ok"; no Acme::BottomsUp; #### my @arr = (1..10); print # lastly, display result join ":", # and glue together map { $_**3 } # then cube each one grep { $_ % 2 } # then get the odd ones @arr # first, start with numbers ; #### package Acme::BottomsUp; use warnings; use strict; our $VERSION = '0.01'; use Filter::Simple; use PPI; FILTER { my $doc = PPI::Document->new(\$_); $_ = join '', map { my $s = $_->content; $s =~ s/;\s*$//s; join("\n", reverse split "\n", $s ) . "\n;" } @{ $doc->find('PPI::Statement') }; }; 1;