I have the following which is not doing what I want it to do as usual. I only want to get the row of hostnames. Also I do not need the first row of Region,Disp,FLAGS,Port.etc but have no idea how to get ride of it. Any help would be appreciated.
#!d:\\perl\\bin\\perl -w
open (ODADMIN , "<oadmin_odlist_input.log") || die;
while(<ODADMIN>){
@input=<ODADMIN>;
print $input[7];
}
close (INFILE);
______oadmin_odlist_input.log_______
Region Disp Flags Port IPaddr Hostname(s)
1017389042 1 ct- 94 10.10.10.1 server1.bob.com,server1
2 ct- 94 10.10.10.2 server2.bob.com
3 ct- 94 10.10.10.3 server3.bob.com
174 ct- 94 10.10.10.4 server4.bob.com
175 ct- 94 10.10.10.5 server5.bob.com
181 -t- 94 10.10.10.6 server6.bob.com
183 ct- 94 10.10.10.7 server7.bob.com
184 ct- 94 10.10.10.8 server8.bob.com
185 -t- 94 10.10.10.9 server9.bob.com
186 ct- 94 10.10.10.10 server10.bob.com
416 ct- 94 10.10.10.11 server11.bob.com
661 ct- 94 10.10.10.12 server12.bob.com
762 ct- 94 10.10.10.13 server13.bob.com
798 ct- 94 10.10.10.14 server14.bob.com
HTH - Stiddy
#!d:\\perl\\bin\\perl -w
open (ODADMIN , "<oadmin_odlist_input.log") || die;
while(<ODADMIN>){
@input=<ODADMIN>;
print $input[7];
}
close (INFILE);
______oadmin_odlist_input.log_______
Region Disp Flags Port IPaddr Hostname(s)
1017389042 1 ct- 94 10.10.10.1 server1.bob.com,server1
2 ct- 94 10.10.10.2 server2.bob.com
3 ct- 94 10.10.10.3 server3.bob.com
174 ct- 94 10.10.10.4 server4.bob.com
175 ct- 94 10.10.10.5 server5.bob.com
181 -t- 94 10.10.10.6 server6.bob.com
183 ct- 94 10.10.10.7 server7.bob.com
184 ct- 94 10.10.10.8 server8.bob.com
185 -t- 94 10.10.10.9 server9.bob.com
186 ct- 94 10.10.10.10 server10.bob.com
416 ct- 94 10.10.10.11 server11.bob.com
661 ct- 94 10.10.10.12 server12.bob.com
762 ct- 94 10.10.10.13 server13.bob.com
798 ct- 94 10.10.10.14 server14.bob.com
HTH - Stiddy