I know the khs, I understand programming but very basic perl.
my code
- #!/usr/bin/perl
-
#
-
$output = `wget -q -O- --bind-address=localhost http://test:64999/server-status`; || die "Problems: $!"
-
$output =~ /CPU Usage: u/;
-
print "$1 ";
I tried for 1 value to print but no output on the screen.
If I get this working I'll try more in perl.
TIA
You're trying to print $1, but you haven't captured anything in the previous regexp. In fact, your regexp on line 4 doesn't do anything except match for "CPU Usage: u", and doesn't capture, change, or affect anything else.
Also, the "|| die" portion of your assignment in line 3 is after a semicolon, which should be giving you syntax errors (or would be if you had use strict and use warnings enabled).