#! /usr/bin/perl $networkid = "192.168.0"; $begin = 1; $end = 20; for ($hostid = $begin; $hostid <= $end; $hostid++) { print "$networkid.$hostid\n"; }