Article View: news.software.readers
Article #46136Re: [slrn] Saving new/unread articles?
From: da... John E. Davis
Date: Fri, 29 Jan 1999 00:00
Date: Fri, 29 Jan 1999 00:00
51 lines
3195 bytes
3195 bytes
On 29 Jan 1999 17:29:37 -0500, tony summerfelt <to...@myspleen.kos.net> wrote: >> Also, providing support for the `~' >> character is nice, but what if there really is a directory called >> `~'? How does one pervent perl from performing the expansion on >> `~'? > >i would think that if there were a directory called `~' then it would be a >problem on the linux command line and not just any program that used it in a >directory name? i think perl understands unix `home' directories. > >i just tried to create a `~' directory on my account and because it's my >`home'directory it already exists, and therefore wouldn't let me. It depends upon your shell. For example, the bourne shell does not understand the `~' variable, nor do many other programs. This means that it is easy to create files or directories called `~'. [...] >> > @articles = sort grep(/\d+/, readdir(dir)); > >> Does the sort perform a numerical sort or an alphabetic sort? >> Does it make a difference? Naively, I would say yes. > >it gets all the files that are numeric only (ie. the articles) and sorts >those numerically I am skeptical about this. Isn't grep passing a list of strings that happen to contain integers to sort? What if I really wanted the strings to be sorted alphabetically and not numerically? [...] >the only reason that i did it this way, is that i couldn't figure out how to >actually delete read articles physically from the directory. had i figured >that out, i would have tried to do it in s-lang. A file may be deleted using the `remove' intrinsic function. >once i had the unread messages archived, i was eager to get them written >back to the directories, and perl was the quickest way to do it Perhaps I am missing something here. When you read an article using slrn, that article does not get deleted from the slrnpull spool directory. It simple gets marked as `read' in the .newsrc file. So, when you archive a file from within slrn (via a macro, or otherwise), the file does not get removed. So, after they have been archive I do not understand why you re-create them in the spool directory. --John
Technical Details
Message-ID:
<slrn7b4hkg.sse.davis@aluche.mit.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mailReferences:
<CBdq2.114$yk7.461@news.get2net.dk> <36aaa085.0@news.kosone.com> <RONq2.59$sG5.292@news.get2net.dk> <36ae8466.0@news.kosone.com> <slrn7atdac.iie.davis@aluche.mit.edu> <36b23651.0@news.kosone.com>Show Full Headers
Complete Article Headers
Message-ID: <slrn7b4hkg.sse.davis@aluche.mit.edu> Subject: Re: [slrn] Saving new/unread articles? Date: Fri, 29 Jan 1999 00:00:00 +0000 From: da...@space.mit.edu (John E. Davis) References: <CBdq2.114$yk7.461@news.get2net.dk> <36aaa085.0@news.kosone.com> <RONq2.59$sG5.292@news.get2net.dk> <36ae8466.0@news.kosone.com> <slrn7atdac.iie.davis@aluche.mit.edu> <36b23651.0@news.kosone.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mail X-Deja-AN: 438522837 X-Complaints-To: use...@eecs-usenet-02.mit.edu X-Trace: eecs-usenet-02.mit.edu 917653144 4034 18.75.2.45 (29 Jan 1999 23:39:04 GMT) Organization: Center for Space Research User-Agent: slrn/0.9.5.4 (UNIX) Reply-To: da...@space.mit.edu NNTP-Posting-Date: 29 Jan 1999 23:39:04 GMT Newsgroups: news.software.readers,alt.lang.s-lang