Re: foreach broken in my script

2007-07-05 Thread Chas Owens
On 7/5/07, oryann9 <[EMAIL PROTECTED]> wrote: --- "Randal L. Schwartz" <[EMAIL PROTECTED]> wrote: snip > DO NOT USE STRING EVAL. EVER. > > Until you understand why I said that. :) Will you kindly explain the logic/reasoning behind this EVER rule? snip Almost anything you want to do with the

Re: foreach broken in my script

2007-07-05 Thread oryann9
--- "Randal L. Schwartz" <[EMAIL PROTECTED]> wrote: > > ""Jeff" == "Jeff Pang" <[EMAIL PROTECTED]> > writes: > > "Jeff> May you need eval?Like, > > No. Wrong direction for a solution. Don't suggest > things like this. Plenty > of proper answers elsewhere in the thread, so I > won't repea

Re: foreach broken in my script

2007-07-04 Thread Randal L. Schwartz
> ""Jeff" == "Jeff Pang" <[EMAIL PROTECTED]> writes: "Jeff> May you need eval?Like, No. Wrong direction for a solution. Don't suggest things like this. Plenty of proper answers elsewhere in the thread, so I won't repeat them. DO NOT USE STRING EVAL. EVER. Until you understand why I said

Re: foreach broken in my script

2007-07-04 Thread Rob Dixon
Joseph L. Casale wrote: I have a list: @list = ('Exchange','Filter','DNS','Domain'); This is a list of arrays I also have of course to leverage this I am trying to . the @ symbol on it during use. foreach $vm (@list) { my_sub("@" . "$vm"); print "@" . "$vm\n";

Re: foreach broken in my script

2007-07-04 Thread Paul Lalli
On Jul 4, 2:29 am, [EMAIL PROTECTED] (Joseph L. Casale) wrote: > I have a list: > @list = ('Exchange','Filter','DNS','Domain'); > This is a list of arrays I also have of course to leverage this I am trying > to . the @ symbol on it during use. > > foreach $vm (@list) { > my_sub("@

RE: foreach broken in my script

2007-07-04 Thread Thomas Bätzler
Joseph L. Casale <[EMAIL PROTECTED]> wrote: > I have a list: > @list = ('Exchange','Filter','DNS','Domain'); > This is a list of arrays I also have of course to leverage > this I am trying to . the @ symbol on it during use. > > foreach $vm (@list) { > my_sub("@" . "$vm"); >

Re: foreach broken in my script

2007-07-03 Thread Jeff Pang
May you need eval?Like, use strict; use warnings; my @list = ('Exchange','Filter','DNS','Domain'); my @Exchange = (1,2); my @Filter = (3,4); my @DNS = (5,6); my @Domain = (7,8); foreach my $vm (@list) { print eval '@'.$vm,"\n"; } __END__ good luck. 2007/7/4, Joseph L. Casale <[EMAIL PR

foreach broken in my script

2007-07-03 Thread Joseph L. Casale
I have a list: @list = ('Exchange','Filter','DNS','Domain'); This is a list of arrays I also have of course to leverage this I am trying to . the @ symbol on it during use. foreach $vm (@list) { my_sub("@" . "$vm"); print "@" . "$vm\n"; } The print likes this, bu