On Jul 23, 1:51 pm, [EMAIL PROTECTED] (John W. Krahn) wrote:
> John W. Krahn wrote:
> > jeevs wrote:
>
> >> I just wanted to know what does the following line do
> >> @{$args{owner}} = qw(hero wierd);
>
> > You are assigning a list to the anonymous array in $args{owner}.
>
> >> lets assume $arg
On Jul 23, 4:35 am, [EMAIL PROTECTED] (Jeevs) wrote:
> I just wanted to know what does the following line do
> @{$args{owner}} = qw(hero wierd);
>
> lets assume $args{owner} = 'sachin';
> Then it would mean @{sachin} = qw(hero wierd);
> what would {sachin} stand for does it mean an hash refern
John W. Krahn wrote:
$ perl -le'
use Data::Dumper;
my %args;
@{ $args{ owner } } = qw( hero wierd );
print Dumper \%args;
$args{ owner } = q/sachin/;
print Dumper \%args;
@{ $args{ owner } } = qw( hero wierd );
print Dumper \%args;
print Dumper [EMAIL PROTECTED];
Of course, if you `use stri
John W. Krahn wrote:
jeevs wrote:
I just wanted to know what does the following line do
@{$args{owner}} = qw(hero wierd);
You are assigning a list to the anonymous array in $args{owner}.
lets assume $args{owner} = 'sachin';
'sachin' is a scalar value.
Then it would mean @{sachin}
jeevs wrote:
Hi forum!
Hello,
I just wanted to know what does the following line do
@{$args{owner}} = qw(hero wierd);
You are assigning a list to the anonymous array in $args{owner}.
lets assume $args{owner} = 'sachin';
'sachin' is a scalar value.
Then it would mean @{sachin} =
Mauro wrote:
Ok guy I solved my problem.
The correct line was:
my @pippo = qx/ssh [EMAIL PROTECTED] sar -u 1 1|awk '\/\%usr
\%sys \%wio \%idle\/ { getline ; printf "\%s \%s \%s \%s\\n",
\$2, \$3, \$4, \$5 }'/ ;
There is a better way. See my last message in this thread.
--
Gunnar Hjalmarsson
Email
Mauro wrote:
I wanted to say...
How can I tell to perl: "take all between qx/ and / without try to
understend what is written" or well "don't try to sobstitue
anything between qx/ and /"?
In that case, you should read the guidance about that in the
description of the qx// operator in "perldoc perl
%..."
Thank you
Mauro
- Original Message -
From: "Mauro" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 14, 2004 1:39 PM
Subject: Re: array assignement
> That's ok Gunnar...
> I wanted to say...
> How can I tell to per
on" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 14, 2004 12:19 PM
Subject: Re: array assignement
> Mauro wrote:
> > I want to assign to an array the output of operating system
> > command: /usr/bin/ssh [EMAIL PROTECTED] sar -u 1 1|awk '/%
Mauro wrote:
I want to assign to an array the output of operating system
command: /usr/bin/ssh [EMAIL PROTECTED] sar -u 1 1|awk '/%usr
%sys%wio %idle/ { getline ; printf "%s %s %s %s\n", $2, $3,
$4, $5 }'
How can I do it?
Use backticks (or the qx// operator) to capture output in Perl from a
s
10 matches
Mail list logo