Skip to content

Instantly share code, notes, and snippets.

@vkgtaro
Created June 28, 2012 09:17
Show Gist options
  • Select an option

  • Save vkgtaro/3010134 to your computer and use it in GitHub Desktop.

Select an option

Save vkgtaro/3010134 to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use utf8;
use lib qw/lib/;
use Capture::Tiny qw/capture_stderr/;
# mkdir -p lib/Capture
# cd lib/Capture/
# curl -O http://cpansearch.perl.org/src/DAGOLDEN/Capture-Tiny-0.18/lib/Capture/Tiny.pm
my $command = q{dialog --inputbox "May I have your name, please?" 8 70 "Anonymous Coward"};
my $stderr = capture_stderr { system($command) };
printf "\n\n[%s]\n\n", $stderr;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment