Tied handle: That's just what I needed to hear. Thanks! From Tie::Simple, it's looking like the easiest to implement might be to tie to the $command_output variable in the example above. I'll only need to define two methods:
use Tie::Simple;
tie $scalar, 'Tie::Simple', $data,
FETCH => sub { ... },
STORE => sub { ... };