Re: push and split

2009-09-20 Thread Dr.Ruud
Chas. Owens wrote: Ruud: Parallel arrays are bad, use an AoA. An Aardvark of Action? No, those are best used for signal processing. Oh, wait, you mean an [Array of Arrays][1]. [1] : http://perldoc.perl.org/perldsc.html#ARRAYS-OF-ARRAYS http://tinyurl.com/kotbcv ;) -- Ruud -- To unsubsc

Re: push and split

2009-09-19 Thread Shawn H Corey
Chas. Owens wrote: On Fri, Sep 18, 2009 at 22:06, Dr.Ruud wrote: Noah Garrett Wallach wrote: Parallel arrays are bad, use an AoA. snip An Aardvark of Action? No, those are best used for signal processing. Oh, wait, you mean an [Array of Arrays][1]. And I thought it was Annoying, Obnoxious

Re: push and split

2009-09-19 Thread Chas. Owens
On Fri, Sep 18, 2009 at 22:06, Dr.Ruud wrote: > Noah Garrett Wallach wrote: > >> I am attempting to read a text file in to two array variables. >> >> --- text file --- >> hostname1 ip1 >> hostname2 ip2 >> >> --- text file --- >> >> >> so basically I would like to have the items in column become an

Re: push and split

2009-09-19 Thread Dr.Ruud
Noah Garrett Wallach wrote: I am attempting to read a text file in to two array variables. --- text file --- hostname1 ip1 hostname2 ip2 --- text file --- so basically I would like to have the items in column become an the elements of an array @routers and then the items in column two in

Re: push and split

2009-09-17 Thread Jim Gibson
On 9/17/09 Thu Sep 17, 2009 12:41 PM, "Uri Guttman" scribbled: >> "SB" == Steve Bertrand writes: > > > SB> while ( my $entry = ) { > > SB> my ( $router, $ip ) = split /\s+/, $entry; > > SB> next if ! defined $ip; > > how would $ip not be defined if the split works? a si

Re: push and split

2009-09-17 Thread Noah Garrett Wallach
Chas. Owens wrote: On Thu, Sep 17, 2009 at 14:05, Noah Garrett Wallach wrote: Hi there, I am attempting to read a text file in to two array variables. --- text file --- hostname1 ip1 hostname2 ip2 --- text file --- so basically I would like to have the items in column become an the element

Re: push and split

2009-09-17 Thread Uri Guttman
> "SB" == Steve Bertrand writes: SB> Another thing, as Chas pointed out, hashes are unorganized, which means SB> that the order of retrieval is almost always different than the order of SB> insertion: just to clarify that, there is no order of retrieval of hash keys, it appears to be r

Re: push and split

2009-09-17 Thread Steve Bertrand
Noah Garrett Wallach wrote: > Steve Bertrand wrote: >> Noah Garrett Wallach wrote: >>> Hi there, >>> >>> I am attempting to read a text file in to two array variables. >>> >>> --- text file --- >>> hostname1 ip1 >>> hostname2 ip2 >>> >>> --- text file --- >>> >>> >>> so basically I would like to ha

Re: push and split

2009-09-17 Thread Noah Garrett Wallach
Steve Bertrand wrote: Noah Garrett Wallach wrote: Hi there, I am attempting to read a text file in to two array variables. --- text file --- hostname1 ip1 hostname2 ip2 --- text file --- so basically I would like to have the items in column become an the elements of an array @routers and t

Re: push and split

2009-09-17 Thread Steve Bertrand
Chas. Owens wrote: > On Thu, Sep 17, 2009 at 14:13, Steve Bertrand wrote: >> Noah Garrett Wallach wrote: >>> Hi there, >>> >>> I am attempting to read a text file in to two array variables. >>> >>> --- text file --- >>> hostname1 ip1 >>> hostname2 ip2 >>> >>> --- text file --- >>> >>> >>> so basic

Re: push and split

2009-09-17 Thread Chas. Owens
On Thu, Sep 17, 2009 at 14:13, Steve Bertrand wrote: > Noah Garrett Wallach wrote: >> Hi there, >> >> I am attempting to read a text file in to two array variables. >> >> --- text file --- >> hostname1 ip1 >> hostname2 ip2 >> >> --- text file --- >> >> >> so basically I would like to have the item

Re: push and split

2009-09-17 Thread Chas. Owens
On Thu, Sep 17, 2009 at 14:05, Noah Garrett Wallach wrote: > Hi there, > > I am attempting to read a text file in to two array variables. > > --- text file --- > hostname1 ip1 > hostname2 ip2 > > --- text file --- > > > so basically I would like to have the items in column become an the elements >

Re: push and split

2009-09-17 Thread Steve Bertrand
Noah Garrett Wallach wrote: > Hi there, > > I am attempting to read a text file in to two array variables. > > --- text file --- > hostname1 ip1 > hostname2 ip2 > > --- text file --- > > > so basically I would like to have the items in column become an the > elements of an array @routers > >

push and split

2009-09-17 Thread Noah Garrett Wallach
Hi there, I am attempting to read a text file in to two array variables. --- text file --- hostname1 ip1 hostname2 ip2 --- text file --- so basically I would like to have the items in column become an the elements of an array @routers and then the items in column two in an array variable o