cool, but why doesn't my @ftapes = system ("evmvol -w label_state=3|grep barcode"); print $ftapes[0]
OR print $ftapes[0,1] work? I see that it does not support multidimensional arrays, so how do I implement this using system? Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams 614-566-4145 "Halkyard, Jim" <[EMAIL PROTECTED]> 05/25/2004 01:58 PM To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> cc: Subject: RE: array population from system app call To capture output you need the backticks my @output = `put your command here`; The return value of a system call is the return value of the program you call. See perldoc perlfaq8 for more info Jim -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 25 May 2004 18:45 To: [EMAIL PROTECTED] Subject: array population from system app call All, was hoping anyone could provide some syntax help. I want to populate an array from a system app call like so.... and then print out each element. my @ftapes = system ("evmvol -w label_state=3|grep barcode"); print $ftapes[0] or print $ftapes[0,1] The problem is it prints out all the lines for print $ftapes[0] and does not print for print $ftapes[0,1] OR should I just run the system call, put it to a file then open the file, read line by line chomp foreach $_ print $_ close file thanks Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>