#!/usr/local/bin/perl -w while (<>) { my @foo = do_stuff($_); print $foo[1]; }