-
-
Save araraloren/f573ac04073108317bae3f3803c7038e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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