I am seeing code optimization done inside the while loop. Thanks
Best regards Bala -----Original Message----- From: Harold Castro [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 22, 2006 2:50 PM To: beginners@perl.org Subject: printing a range of ip addresses Hi, Can you tell me why this loop doesn't work??? #!/usr/local/bin/perl use warnings; use strict; our $hostpart = 1; our $networkpart = 128; $|=1; while ($networkpart <= 158){ while ($hostpart <= 256){ print "202.90.".$networkpart.".".$hostpart, "\n"; ++$hostpart; } ++$networkpart; } It only prints the range from 202.90.128.0 - 202.90.128.256. I want it print upto 202.90.158.256. Thanks.. --------------------------------- Yahoo! Mail Bring photos to life! New PhotoMail makes sharing a breeze. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>