excellent I did not know that about system!
thanks again!
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
James Edward Gray II <[EMAIL PROTECTED]>
05/25/2004 02:08 PM
To: [EMAIL PROTECTED]
cc: Perl Beginners <[EMAIL PROTECTED]>
Subject: Re: array population from system app call
On May 25, 2004, at 1:03 PM, [EMAIL PROTECTED] wrote:
> cool, but why doesn't
> my @ftapes = system ("evmvol -w label_state=3|grep barcode");
> print $ftapes[0]
>
> OR
> print $ftapes[0,1]
>
> work?
Because system() does not return the program's output, it returns exit
status.
> I see that it does not support multidimensional arrays, so how do I
> implement this using system?
Multi-dimensional arrays are possible in Perl, with references. If you
want to talk about that, please send a new message asking your
questions about that topic.
You don't do what you show with system() because that's not what it's
for. Backticks fill that role.
James