Path: utzoo!attcan!uunet!snorkelwacker!ira.uka.de!smurf!urlichs From: urlichs@smurf.sub.org (Matthias Urlichs) Newsgroups: comp.lang.perl Subject: Re: This looks like a job for Perl Man (NNTP) Message-ID: Date: 27 Sep 90 08:25:18 GMT References: <20550@orstcs.CS.ORST.EDU> <18409:Sep2703:08:1290@kramden.acf.nyu.edu> <9695@jpl-devvax.JPL.NASA.GOV> Organization: University of Karlsruhe, FRG Lines: 39 In comp.lang.perl, article <9695@jpl-devvax.JPL.NASA.GOV>, lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) writes: < : < : Because certain people don't believe in accurate min article fields, < : it's safer to convert the unread articles. < < Might be faster too, depending on how many unread newsgroups you keep in < your .newsrc. < < The only problem I see with doing the unreads is that you would end up < marking as read any articles that happened to be on the new server but < not on the old, unless you constructed the universal set on the old server < (which is certainly doable, but a drag). < Another problem is that nobody guarantees that the articles on both servers are in the same order. So I'd do something like this, assuming that the NNTP servers understand XHDR (most do): for each group read numbers of known articles old:GROUP old:XHDR Message-ID 1-9999999 remember the ID of every read article forget list of numbers -- not applicable to new server new:GROUP new:XHDR Message-ID 1-9999999 remember the number of every known ID remember which articles are not present construct read-messages list by concatenating the ranges of remembered numbers; don't forget to omit the range from last_article+1 to 9999999 :-) That would probably do it. Anyone want to code it in Perl? Concatenating the number ranges into a reasonable newsrc line doesn't look particularly easy, although Randal will surely invent a good one-liner for it. ;-) -- Matthias Urlichs -- urlichs@smurf.sub.org -- urlichs@smurf.ira.uka.de /(o\ Humboldtstrasse 7 - 7500 Karlsruhe 1 - FRG -- +49+721+621127(0700-2330) \o)/