use strict; use warnings; use Pipes; print "hello" | fn { ucfirst($_[0]) } | fn { [ split('', $_[0]) ] } | fn { [ reverse(@{$_[0]}) ] } | fn { join('-', @{$_[0]}) } | fn { $_[0] . "\n" };