Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I need to find out how to get an output from a file with a :
delimeter. I want to just get the Server name here.
So my output right now is:
So my output right now is:
I would like it to be:222.222.333.444:firstServer 121.222.222.222:secondServer
here is my script as of now:firstServer secondServer
@a = (<DATA>); $file = "bas.txt"; foreach (@a) { open(FILE,">>$file") || die "Can't open $file: $! \n"; print FILE "$_\n"; } close(FILE); close(DATA); __DATA__ 222.222.333.444:firstServer 121.222.222.222:secondServer
Back to
Seekers of Perl Wisdom