Edit your loop like this
while ($networkpart <= 158){ while ($hostpart <= 256){ print "202.90.".$networkpart.".".$hostpart, "\n"; $hostpart++; } # #Change the $hostpart back to 0 # $hostpart=0; $networkpart++; } --- Harold Castro <[EMAIL PROTECTED]> wrote: > 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. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>