Skip to content

Instantly share code, notes, and snippets.

@FROGGS

FROGGS/todd.p6 Secret

Created March 17, 2018 08:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save FROGGS/b69f403ee538698ad3bea7b5faebfae4 to your computer and use it in GitHub Desktop.
Save FROGGS/b69f403ee538698ad3bea7b5faebfae4 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 "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, ">\n\nRtnErr <", $RtnErr, ">";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment