Skip to content

Instantly share code, notes, and snippets.

@araraloren
Forked from FROGGS/todd.p6
Last active March 17, 2018 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save araraloren/f573ac04073108317bae3f3803c7038e to your computer and use it in GitHub Desktop.
Save araraloren/f573ac04073108317bae3f3803c7038e to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl6
# https://docs.perl6.org/routine/run
my $proc;
my $RtnStr;
my $RtnErr;
my $RtnCode = "";
$proc = run "curl", "-vvv", "-L", "http://www.gbis.com", "-o", "eraseme.html", :err, :out;
say $proc.status;
say "reading :err";
$RtnErr = $proc.err.slurp(:close);
say "reading :out";
$RtnStr = $proc.out.slurp(:close);
say "reading return code";
$RtnCode = $proc.status;
say "RtnCode <$RtnCode>\n\nRtnStr <", $RtnStr.chars, ">\n\nRtnErr <", $RtnErr.chars, ">";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment