in reply to Re: Re: array problem
in thread array problem
In list context, returns a list of lines (however you've defined lines with $/ or $INPUT_RECORD_SEPARATOR), or an empty list if the command failed.By default, that is a newline. So the list returned contains one item per line. The question remains: does your command line return a multiline result? I'm not familiar with what you try to do, so I can't tell.
You can easily test in two ways:
@a = qx(COMMANDLINE); print scalar @a;
$a = qx(COMMANDLINE); print "<plaintext>$a";
I just hope that yo ucan tweak your command line so that you can get separate lines for the returned items. If not, you can set $/ to whatever string separates the data items.
|
|---|