#!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; use open qw(:std :utf8); my $res; my $ua = LWP::UserAgent->new( ssl_opts => { verify_hostname => 0 } ); my $response = $ua->get("https://www.url.net/service/status"); if($response->decoded_content =~ /"messageType":"(.*?)","(.*?)"/mi ) { $res=$1; } print "$res\n";
In reply to Re^2: variablize command in perl script
by cbtshare
in thread variablize command in perl script
by cbtshare
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |