cat oration |perl -ne '(our $line.=join("",("\n"," "x15,$`)),next) if /\\$/; ($_=($line.=join("",("\n"," "x15,$_))),undef $line) if defined $line; print "Monk\x{27}s Pope: ",$_,((length) < 64?scalar(undef $skip,"Fellow Monks: "):scalar(our $skip=1,"")); %myself=(i,me,me,i,we,us,us,we); sub i{my $final; ($_=shift)=~s/_//g; print ((join " ",(reverse map { $myself{$_}?$myself{$_} : ((m/^(\S+).*/, exists $myself{$1})? scalar((($final=$_)=~s/^(\S+)\s+//, $myself{$1})) : $_)} @_)),(substr($_[0],-1,1) eq q|s|? "\b" : ""),(substr($_[1],-1,1) eq q|s|)? q|| : q|s|," ",$myself{$_}?$myself{$_} : $_," $final\n") }; s/(\S+)\s+(\S+)\s+(.*)/$1 _$1_, $2, "$3"/; *$1=\&i if ($1); %dicc=(map { (@{$_},reverse @{$_}) } ([guide,follow],[love,love])); $pattern=join "|", keys %dicc; s/($pattern)/$dicc{$1}/; $text=$_; map { (eval $text, goto END) if $text=~m/$_/ } keys %dicc; print "Amen\n" unless defined $skip; END:' #### # cat new_year Welcome Brothers in Arms Here's to the bright New Year, \ and a fond farewell to the old; \ here's to the things that are yet to come, \ and to the memories that we hold Happy New Year!! #### Monk's Pope: Welcome Brothers in Arms Fellow Monks: Amen Monk's Pope: Here's to the bright New Year, and a fond farewell to the old; here's to the things that are yet to come, and to the memories that we hold Monk's Pope: Happy New Year!! Fellow Monks: Amen #### echo 'i love perl' | perl -ne 's/(\S+)\s(\S+)\s(\S+)/... and $3 $2s you .../; print' #### perl -e 'sub i; i love, perl; sub i { print "... and ", ((join " ",(reverse @_)),substr($_[1],-1,2) eq q|s|? q|| : q|s| ," you ...\n") }' #### echo perl loves all of us | perl -ne '%myself=(i,me,me,i,we,us,us,we); sub i{($_=shift)=~s/_//g; print ((join " ",(reverse map { $myself{$_}?$myself{$_} : $_} @_)),(substr($_[0],-1,1) eq q|s|? "\b" : ""),(substr($_[1],-1,1) eq q|s|)? q|| : q|s|," ",$myself{$_}?$myself{$_} : $_,"\n") }; s/(\S+)\s+(\S+)\s+(.*)/$1 _$1_, $2, "$3"/; *$1=\&i if ($1); eval;' #### cat reciprocity | perl -ne '%myself=(i,me,me,i,we,us,us,we); sub i{my $final; ($_=shift)=~s/_//g; print ((join " ",(reverse map { $myself{$_}?$myself{$_} : ((m/^(\S+).*/, exists $myself{$1})? scalar((($final=$_)=~s/^(\S+)\s+//, $myself{$1})) : $_)} @_)),(substr($_[0],-1,1) eq q|s|? "\b" : ""),(substr($_[1],-1,1) eq q|s|)? q|| : q|s|," ",$myself{$_}?$myself{$_} : $_," $final\n") }; s/(\S+)\s+(\S+)\s+(.*)/$1 _$1_, $2, "$3"/; *$1=\&i if ($1); %dicc=(map { (@{$_},reverse @{$_}) } ([guide,follow],[jump,unjump])); s/(guide|follow)/$dicc{$1}/;eval;'