Advertisement
hakonhagland

Capture output from command

Sep 27th, 2016
468
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.16 KB | None | 0 0
  1. #! /usr/bin/env perl
  2.  
  3. use feature qw(say);
  4. use strict;
  5. use warnings;
  6.  
  7. my $output = `perl user.pl`;
  8.  
  9. if ( $output =~ /Access Token: (.*)$/ ) {
  10.     say $1;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement