Hi! I made this short script in order to see if there is posible to run "modified" unix commands from a Perl script.
#!/usr/bin/perl use strict; use warnings; my $load = `uptime | awk '{print $8 $9 $10 $11 $12}'`; print "$load\n"; when I am trying to run this skript, I get the whole uptime output, not only the load averages: x x x And this Error msg: Use of uninitialized value $8 in concatenation (.) or string at ./test.plline 6. Use of uninitialized value $9 in concatenation (.) or string at ./test.plline 6. Use of uninitialized value $10 in concatenation (.) or string at ./test.plline 6. Use of uninitialized value $11 in concatenation (.) or string at ./test.plline 6. Use of uninitialized value $12 in concatenation (.) or string at ./test.plline 6. 17:20:46 up 7 days, 6:52, 11 users, load average: 0.00, 0.00, 0.00 Please help!