On Fri, Apr 9, 2010 at 11:31 AM, Niko zuna <niko.z...@gmail.com> 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 <bamcc...@gmail.com>
V zrna gur orfg jvgu jung V fnl. Vg qbrfa'g nyjnlf fbhaq gung jnl.
Castopulence Software <http://www.castopulence.org/> <bamcc...@castopulence.org>

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to