On Fri, Apr 9, 2010 at 11:31 AM, Niko zuna <[email protected]> wrote:
> 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!
>
The $8 - $12 are being interpreted by Perl, the same "$load\n" is. You
need to escape them so that awk gets them instead.
For example, this seems to work:
my $load = `uptime | awk '{print \$8 \$9 \$10 \$11 \$12}'`;
--
Brandon McCaig <[email protected]>
V zrna gur orfg jvgu jung V fnl. Vg qbrfa'g nyjnlf fbhaq gung jnl.
Castopulence Software <http://www.castopulence.org/> <[email protected]>
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/