Re: problems using split

2001-05-23 Thread Andy Roden
On Wed, 23 May 2001, Me wrote: > > ($router_table{i},$router_type{i}) = split(/\|/, > > $router_tables{i}); > > All those indices should be {$i} rather than {i}. They are actually $i in the script, just typos in the mail... appologies... > > I'm figuring it's the {i} causing the prob

Re: problems using split

2001-05-23 Thread Me
> ($router_table{i},$router_type{i}) = split(/\|/, > $router_tables{i}); All those indices should be {$i} rather than {i}. > I'm figuring it's the {i} causing the problem You had it figured...

Re: problems using split

2001-05-23 Thread Jeff Pinyan
On May 23, Andy Roden said: >($router_table{i},$router_type{i}) = split(/\|/, >$router_tables{i}); You probably want that to be $i, not i. >if ($router_table{i} ne "") { >print SH "\"$router_table{i}\" "; >} There too. >else { >print SH "\"$rout

problems using split

2001-05-23 Thread Andy Roden
ANyone help me out with a problem I'm having splitting some | separated variables... %router_tables contains entries like 0.0.0.0|unknown 1.1.1.1|cisco 2.2.2.2|juniper foreach $i (sort keys %router_tables) { next if ($i =~ "unknown"); ($router_table{i},$router_type{i}) = split