Re: run Unix commands from script!

2010-04-09 Thread John W. Krahn
Niko zuna wrote: Hi! Hello, 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}'`; my ( $load ) = `uptime` =~ /(load average: .+)/;

Re: run Unix commands from script!

2010-04-09 Thread Shlomi Fish
On Friday 09 Apr 2010 18:31:31 Niko zuna wrote: > 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

Re: run Unix commands from script!

2010-04-09 Thread Shawn H Corey
Niko zuna wrote: 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,

Re: run Unix commands from script!

2010-04-09 Thread Brandon McCaig
On Fri, Apr 9, 2010 at 11:31 AM, Niko zuna 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.

run Unix commands from script!

2010-04-09 Thread Niko zuna
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 upt

run Unix commands from script!

2010-04-09 Thread Niko zuna
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 upt