On 5/9/06, Smith, Derek <[EMAIL PROTECTED]> wrote:
my (@key2,$value2) = 0;
This statement is odd. It's making a new array with a single element (which element is zero). I think you mean something like this: my(@key2); my $value2 = 0;
$key2[$value2++] = (grep /mirror/gi, `lvdisplay $_` );
You probably don't want the /g option on the grep pattern, since it's being evaluated in a scalar context. And you're evaluating the grep itself in a scalar context; I think you might want something like this(?) to push the "mirror" output lines onto the @key2 array: push @key2, grep /mirror/i, `lvdisplay $_`; Does any of that get you closer to a solution? Those are just the things that jump out at me when I look a second time; there's probably more. :-) You may need to step through your program in the debugger until you find where it's going wrong. Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>