代码如下: use HTTP::UserAgent; use JSON::Tiny; my $check-url = 'www.baidu.com'; #say @*ARGS[0]; #检测命令行参数 if @*ARGS != 0 { $check-url = @*ARGS[0].lc; }else{ say 'no http/https, eg:'; say 'cms-check.p6 www.target.com'; exit; } my $url = 'http://120.24.44.1