in reply to Cutting last word from a output line

I assume you mean something like this:

#!/usr/bin/env perl -a use strict; use warnings; use feature qw (say); my $var = pop @F; say $var; __END__ karls-mac-mini:monks karl$ echo foo bar | ./1118114.pl bar

Regards, Karl

«The Crux of the Biscuit is the Apostrophe»