[prog] perl string question

mc mcgonzalez at att.net
Thu Feb 27 18:22:51 EST 2003


Hi all!  I am writing a perl script that eventually will return a file
that can be used to pull some posting statistics from an nntp server.=20
Amazing since I am teaching myself perl at the same time (can't wait for
the course to start here!)

Anyway.  I think I have made good progress in that I have the output
file to the point where I have all the header information I need for
each post on the server.  My problem is that the first line of the
headers contains two bits of info, and I would like to separate them.=20
An example:

^~00002439:0000007179:000016:Message-ID: <3E33C3BD.21CD8BB6 at att.net>

I would like to output this to my working file so it ends up as:

^~00002439:0000007179:000016:
Message-ID: <3E33C3BD.21CD8BB6 at att.net>

I thought I could do this with the split function, but since I only want
to split it at the third ":" I am not sure how to write that.  I am also
lost as to how then to print the results to my file.  I am sure it is a
print statement, just a bit lost :)

Once I get this figured out, I am pretty sure I have the next part
figured out and am almost done.=20

Any ideas or pointers to the best way to do this would be very much
appreciated!!!


--=20
mc
I haven't lost my mind,
It is backed up on disk somewhere.
4M




More information about the Programming mailing list