Here is one (inelegant) approach which might work for you:
#! perl use strict; use warnings; use Capture::Tiny ':all'; my ($stdout, $stderr, @result) = capture { interface_control(); }; my @lines = split "\n", $stdout; print $lines[0], "\n"; sub interface_control { my @r; get_handles(\@r); print "blah blah for $_\n" for @r; } sub get_handles { @{ $_[0] } = 11 .. 13; }
Output:
14:00 >perl 1204_SoPW.pl blah blah for 11 14:00 >
Update: Removed unnecessary parentheses from print statement, plus a blank line.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re^3: Accessing single element without args
by Athanasius
in thread Accesing single element without args
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |