RE: Using backtick operator output and feeding it into array

2010-04-22 Thread Lonnie Ellis
-Original Message- From: Uri Guttman [mailto:u...@stemsystems.com] Sent: Wednesday, April 21, 2010 4:21 PM To: Lonnie Ellis Cc: beginners@perl.org Subject: Re: Using backtick operator output and feeding it into array >>>>> "LE" == Lonnie Ellis writes: LE>

RE: Using backtick operator output and feeding it into array

2010-04-22 Thread Lonnie Ellis
-Original Message- From: Linux Expert [mailto:linuxexper...@gmail.com] Sent: Wednesday, April 21, 2010 4:28 PM To: beginners@perl.org Subject: Re: Using backtick operator output and feeding it into array (@digOutput) = `dig -x $ipaddie +short`; The line shown above is replacing the

Re: Using backtick operator output and feeding it into array

2010-04-21 Thread Linux Expert
(@digOutput) = `dig -x $ipaddie +short`; The line shown above is replacing the entire @digOutput array on each assignment. Try this instead: push @digOutput,`dig -x $ipaddie +short`;

Re: Using backtick operator output and feeding it into array

2010-04-21 Thread Uri Guttman
> "LE" == Lonnie Ellis writes: LE> I'm pretty new to perl, and can't seem to get the following bit of code LE> to work. If I print the array while in the sub, it returns what I want LE> but outside of the sub it doesn't recognize it. Aren't all variable LE> global by default unless