in reply to send STDOUT STDERR to function
#!/usr/bin/perl use strict; use warnings; my $output = `whoami 2>&1`; name(); sub name { print "You are $output"; } [download]