Re: RE: a print problem.

2005-05-17 Thread Zhenhai Duan
Wagner, Many thanks for the help. It turned out that the problem is related to the input file, where each line ends with both a \n and \r. It seems that chomp() has removed \n, but \r is still there, so that the key and value etc are not integers. I also noticed that if I read the file, and then

RE: a print problem.

2005-05-17 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Zhenhai Duan wrote: > Hi, > > I have a simple code but I just cannot get the correct result. Can > anyone take a look at the code for me? Many thanks. > > print "\nOutput: AS -- Subnets\n"; > foreach $key (sort numerically (keys %subnets)) { >print "key = $key", "\n"; >@subnet = split(/:/