[9938] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3531 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 25 00:01:59 1998

Date: Mon, 24 Aug 98 21:00:19 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 24 Aug 1998     Volume: 8 Number: 3531

Today's topics:
    Re: "protocol not supported" with socket() <zenin@bawdycaste.org>
    Re: apache-perl question no.unsoliciteds@dead.end.com
    Re: Attaching a file to an email with a cgi script hashem@my-dejanews.com
    Re: Code Optimization-- Can I do this better? <mpersico@erols.com>
    Re: Counting files in a directory in WinNT (Larry Rosler)
    Re: eval() and Subroutines (Abigail)
        glob not working through browser <tbeaulieu@mediaone.net>
    Re: Help!..re: secure sendmail question <leegala@nospam.ican.net>
    Re: Ignoring lines in a data file (brian d foy)
        need help with unix sockets (or maybe just CGI) <sdurst@sprintmail.com>
    Re: Perl compiler (Martien Verbruggen)
    Re: Perl compiler (Abigail)
    Re: Perl documentation <mpersico@erols.com>
    Re: Perl documentation <mpersico@erols.com>
    Re: Perl documentation (David Hawker)
    Re: Perl documentation (David Hawker)
    Re: Perl documentation (David Hawker)
    Re: Perl FAR version 1.1.1 MAKE SURE YOU READ THIS BEFO <mds-resource@mediaone.net>
    Re: Prime numbers [was Re: here's an implementation of  <dformosa@st.nepean.uws.edu.au>
    Re: Prime numbers [was Re: here's an implementation of  (Michael Rubenstein)
    Re: subsorting a report (brian d foy)
        Win32::OLE question <jhempe@crossroute.com>
    Re: Y2K Date Support (brian d foy)
    Re: Y2K Date Support (Martien Verbruggen)
        Yes, someone else in need of PERL help <gregory@bit.csc.lsu.edu>
    Re: Yes, someone else in need of PERL help (Nathan V. Patwardhan)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 25 Aug 1998 03:38:48 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: "protocol not supported" with socket()
Message-Id: <904016213.226707@thrush.omix.com>

Gregor Mosheh <gregor@novoironlight.com> wrote:
: Your script worked A-OK. I've used the older one (the one I posted) on
: several systems without trouble - but not on Solaris. Thanks for the
: script - much nicer version of the original. :)

        Yep, it's a platform issue with the constants you used for
        SOCK_STREAM.  The original Camel is using what most BSD systems
        define these constants as, but not all systems use the same
        values.  This is why we have things like the Socket module to
        make sure we're using the right values:

        $ uname -a 
        SunOS omix 5.5.1 Generic_103640-12 sun4m sparc SUNW,SPARCstation-20
        $ perl -MSocket -e 'print "AF_INET: ", AF_INET, "\nSOCK_STREAM ", SOCK_STREAM, "\n"'
        AF_INET: 2
        SOCK_STREAM 2

        $ uname -a
        FreeBSD thrush.omix.com 2.2.7-STABLE FreeBSD 2.2.7-STABLE #0: Fri Jul 24 00:22:18 PDT 1998     byron@thrush.omix.com:/usr/src/sys/compile/THRUSH i386
        $ perl -MSocket -e 'print "AF_INET: ", AF_INET, "\nSOCK_STREAM ", SOCK_STREAM, "\n"'
        AF_INET: 2
        SOCK_STREAM 1

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


------------------------------

Date: Tue, 25 Aug 1998 11:07:23 +0900
From: no.unsoliciteds@dead.end.com
Subject: Re: apache-perl question
Message-Id: <35E21C60.16957B87@dead.end.com>

This isn't done through Perl,and although you probably would be better served
asking in another forum the authorisation dialog is generated by the server
when one of the docs that is p/w protected is requested by the client. I
suggest you check if your webserver has a manual explaining HTACCESS files
Anton Maximov wrote:
> 
> i would like to call a apache's auth routine that pops up the BASIC
> AuthType dialog box that prompts for the username and password and then
> sends then to the server for authentication with the .htaccess file. so
> i guess the question is if there is a module that will let me to pop up
> that dialog box and let me use the variables later (run them through
> database query or smth like that). seems like this method will be much
> secure than html forms.
> 
> thank you
> 
> ---
> Anton


------------------------------

Date: Tue, 25 Aug 1998 03:21:37 GMT
From: hashem@my-dejanews.com
Subject: Re: Attaching a file to an email with a cgi script
Message-Id: <6rtak0$l42$1@nnrp1.dejanews.com>

Try this script, and see how it sends the file as attachment:

  $top = new MIME::Entity->build ( Type    => "multipart/mixed",
                                   From    => "you\@somewhere.ca",
                                   To      => "someone\@bbb.ca",
                                   Subject => "Hello, Man!");

	 $top->attach (		Type	=>"application/zip",
				Encoding =>"base64",
                                Path     => "./something.zip",
                                Filename => "newname.zip",
                                Disposition => "attachment");


         # Send it:
         open MAIL, "| /usr/lib/sendmail -t -i" or die "open: $!";
         $top->print(\*MAIL);
         close MAIL;

Don't forget this script uses MIME::Entity module.
Hope this will help you. If you have more question drop a line to me.

Hashem.

In article <35CBB260.2E59@comenius.ms.mff.cuni.cz>,
  Jan Krynicky <JKRY3025@comenius.ms.mff.cuni.cz> wrote:
> Charles Maier wrote:
> >
> > chris_wellner@my-dejanews.com wrote:
> > >
> > > There have been a couple questions and answers on this topic but I'm still
> > > having some trouble.  I need to have a script-generated email attach a
> > > document to the email.
> >
> > I just finished work on a site (N/T) where Sendmail was not an option.
> > Instead I wrote the code to use Sender.pm. It was not my choicee. The
> > client ISP dictated this. This module uses Sockets and talks directly to
> > a SMTP server. Having done this... I am rethinking using Sendmail on
> > future projects. It just makes my code more portable.
> >
> > Sender.pm (Rev 0.6) and the following modules will send a file as a
> > attachment along with normal email messages.
> >
> > FileHandle;
> > Socket;
> > MIME::Base64;
> > MIME::QuotedPrint;
> >
> > Its pretty well documented.
> > --
> > Chuck Maier
>
> Glad you like it.
> The address is http://www.fmi.cz/private/Jenda or
> http://jenda.krynicky.cz
>
> Cheers, Jenda
>

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


------------------------------

Date: Mon, 24 Aug 1998 22:43:32 -0400
From: "Matthew O. Persico" <mpersico@erols.com>
Subject: Re: Code Optimization-- Can I do this better?
Message-Id: <35E224D4.B6E3D782@erols.com>

Gee, has school started already? :-)

WebGuyis1 wrote:
> 
> This is what I have and I want to know if there is a better and more efficient
> way of accomplishing my task.
> 
> Q: I need to generate three random numbers from 0 -> $limit .  All three
> numbers must be unique and use the PERL language.
> 
> $limit = 4;
> 
> # Random Number Generator Engine
> sub rndengine{
>   srand(time|$$);
>   $i = int(rand($limit));
>   $i;
> }
> 
> # Generate Numbers
> sub generate{
>         $num1 = &rndengine;
>         $num2 = &rndengine;
>         $num3 = &rndengine;
> 
>         while($num1 == $num2){
>                 $num2 = &rndengine;
>                 while($num2 == $num3){
>                         $num3 = &rndengine;
>                         while($num1 == $num3){
>                                 $num1 = &rndengine;
>                         }
>                 }
>         }
> }
> 
> Any suggestions would be most appreciated!
> 
> Lance Wilson
> (lance@webguy-prod.com)
> WebGuy Productions, Inc.
> President

-- 
#!/usr/bin/perl -- Matthew O. Persico
print "Just Another Perl Neophyte\n";
## Simplicity is a blessing when you're 
## supporting the program at 2AM


------------------------------

Date: Mon, 24 Aug 1998 20:02:11 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Counting files in a directory in WinNT
Message-Id: <MPG.104bc9136c8c165c9897e7@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and copy mailed.]

In article <6rso25$sq7$1@nnrp1.dejanews.com> on Mon, 24 Aug 1998 22:04:53 
GMT, npolonsk@hotmail.com <npolonsk@hotmail.com> says...
 ...
> I want to count the number of files there are in a directory.

#!/usr/local/bin/perl -w
use strict;

my $dir = '/etc'; # or whatever...
opendir DIR, $dir or die "Couldn't open $dir. $!\n";
my $files = grep -f "$dir/$_" => readdir DIR;
closedir DIR;
print $files, "\n";

-- 
(Yet Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: 25 Aug 1998 03:18:22 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: eval() and Subroutines
Message-Id: <6rtadu$1t2$3@client3.news.psi.net>

Mooneer Salem (mooneer@earthlink.net) wrote on MDCCCXIX September
MCMXCIII in <URL: news:35E1DF52.E38E6B26@earthlink.net>:
++ In perl, if i use an eval() block and I call subroutines defined outside
++ the block, will it result in any errors?
++ 

What happens when you try?



Abigail
-- 
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))


------------------------------

Date: Mon, 24 Aug 1998 22:24:52 -0400
From: "Todd B" <tbeaulieu@mediaone.net>
Subject: glob not working through browser
Message-Id: <6rt7cc$e3d$1@wbnws01.ne.highway1.com>

iis 4
glob("whatever path") is returning nothing when run through the browser, but
works correctly when run from the command line.  the script is otherwise
working, so permissions seem to be correct.

any ideas?




------------------------------

Date: Mon, 24 Aug 1998 22:29:09 -0400
From: "Mr. mister" <leegala@nospam.ican.net>
Subject: Re: Help!..re: secure sendmail question
Message-Id: <35E22175.59C49172@nospam.ican.net>

Martien Verbruggen wrote:

> In article <6rnem2$1au$67@elle.eunet.no>,
>         "Mr. mister" <leegala@nospam.ican.net> writes:
> > Hi folks,
>
> > I have done this but it doesn't work, I get a returned message after
>
> > posting the data: "the server must be down or there is an internal
> > error, contact your administrator".
>
> Posting this four times does not make it a perl issue. Try asking thsi
>
> question (once) on one of the comp.infosystems.www.* groups.
>
> Martien
> --
> Martien Verbruggen                      |
> Webmaster www.tradingpost.com.au        | "In a world without fences,
> Commercial Dynamics Pty. Ltd.           |  who needs Gates?"
> NSW, Australia                          |


Where do you see it posted four times asshole? Even if I did, it would
have been by accident. So go fuck yourself.



------------------------------

Date: Mon, 24 Aug 1998 22:10:08 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Ignoring lines in a data file
Message-Id: <comdog-ya02408000R2408982210080001@news.panix.com>
Keywords: from just another new york perl hacker

In article <35E1ECA6.64745E1F@home.net>, Alan Melton <arm@home.net> posted:

>I am opening a file to read lines into a printout:

>I only want to use the files where the fourth or fifth field.etc has a
>value,
>otherwise I want the program to continue reading down to the next line
>to see if
>it fulfills the criteria and so on. If it finds another record with
>data, 
>that line should be included.

okay.  so what's the question?  perhaps something about the keyword
`next'? :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers needs volunteers! <URL:http://www.pm.org/to-do.html>


------------------------------

Date: Mon, 24 Aug 1998 22:39:24 -0400
From: Steve Durst <sdurst@sprintmail.com>
Subject: need help with unix sockets (or maybe just CGI)
Message-Id: <35E223DB.C0CC162D@sprintmail.com>

Hi,

(I apologize ahead of time for the length of this post, but I thought it
would help if I included all of the info I'm relying on.)

I'm trying to write a client-server pair that communicate over unix
sockets.  (Development platform is linux 2.0.30, perl v5.004_04.)

I want the server to supply data for the client to use in building a web
page.  So far I can have the client and server hook up and pass the
appropriate information back and forth.  The problem comes when the
client finishes reading the data from the socket and then tries to print
to STDOUT.  according to strace, the client actually prints to
STDOUT and exits, but my browser still indicates that it's waiting and
waiting.  Once I'm in this holding pattern, I do a 'ps' and find that
the server alone is still running.  If I kill it, the browser finally
displays the web page, even though the client terminated long ago.

At the end of this message I included the code and straces for the
client and server.  Darned if i can figure out why the client, which is
obviously printing to STDOUT (according to the strace) isn't getting its
data across to the browser.

For comparison, I straced another CGI-generated page that didn't mess
around with sockets-- that strace is listed last.  The only difference
I can see between it and the client's is the placement of the low-level
sigprocmask() calls.

Can anyone tell me what I might be missing here?

Thanks,

-Steve


Here's the code for the client and server:

# CLIENT:
until (-e $sscf) { warn "client: waiting for socket endpoint" ; sleep 1
}
until (socket(SOCK, PF_UNIX, SOCK_STREAM, undef)) {
    warn "client: trying to get a socket: $!" ; sleep 1
}
select(SOCK); $| = 1;
until (connect(SOCK, sockaddr_un($sscf))) {
    warn "client: trying to connect to $sscf: $!" ; sleep 5
}
# request current config -- ends in string "EOF"
print SOCK "get\n";
while (($_=<SOCK>) && ($_ !~ /^EOF/o)) {
    next unless $_;
    chomp;
    warn "read line |$_|";
    if (/^$service deny (\S*)/) {
        push @blacklist, $1;
        next;
    } elsif (/^$service allow (\S*)/) {
        push @goldlist, $1;
        next;
    } elsif (/^$service port (\S*)/) {
        $port = $1;
    }
}
shutdown(SOCK,2);
close SOCK;
select(STDOUT); $| = 1;
print <<END_BLOCK
Content-type: text/html

<html><title>$title</title><body><center><h1>$title</h1><br>
    .
    .
    .


# SERVER:
until (socket(LOCAL, AF_UNIX, SOCK_STREAM, undef)) {
    warn "server: trying to get a socket" ; sleep 1
}
setsockopt(LOCAL, SOL_SOCKET, SO_REUSEADDR, pack("l",1));
select(LOCAL); $| = 1;
until (bind(LOCAL, sockaddr_un("$sscf.current"))) {
    warn "server: trying to bind to $sscf: $!" ; sleep 1
}
until (listen(LOCAL, SOMAXCONN)) {
    warn "server: trying to listen: $!" ; sleep 1
}
while (accept(REMOTE, LOCAL)) {
    select(REMOTE); $| = 1;
    warn "server: connected";
    $cmd = <REMOTE>;
    next unless $cmd;
    chomp $cmd;
    warn "server: got cmd |$cmd|";
    if ($cmd =~ /get/o) {
        warn "server: received 'get' command";
        print REMOTE "dns port $port\n";
        foreach (@blacklist) {
            next unless $_ ; print REMOTE "dns deny $_\n"
        }
        foreach (@goldlist) {
            next unless $_ ; print REMOTE "dns allow $_\n"
        }
        print REMOTE "EOF\n";
        warn "server: web page serve results: $!";
    }
    warn "server: shutdown remote end in loop: $!";
    shutdown(REMOTE, 2);
}
warn "server: accept failed: $!";
shutdown(LOCAL, 2);


Here's the strace for the server:
21:34:27.641549 socket(PF_UNIX, SOCK_STREAM, , 0) = 3
21:34:27.644389 fcntl(3, F_GETFL)       = 0x2 (flags O_RDWR)
21:34:27.646396 fstat(3, {st_mode=S_IFSOCK, st_size=0, ...}) = 0
21:34:27.648009 mmap(0, 1024, PROT_READ|PROT_WRITE, MAP_PRIVATE|0x20,
4294967295, 0) = 0x400dc000
21:34:27.649705 lseek(3, 0, SEEK_CUR)   = -1 ESPIPE (Illegal seek)
21:34:27.656149 fcntl(3, F_GETFL)       = 0x2 (flags O_RDWR)
21:34:27.657410 fstat(3, {st_mode=S_IFSOCK, st_size=0, ...}) = 0
21:34:27.658623 mmap(0, 1024, PROT_READ|PROT_WRITE, MAP_PRIVATE|0x20,
4294967295, 0) = 0x400e1000
21:34:27.659961 lseek(3, 0, SEEK_CUR)   = -1 ESPIPE (Illegal seek)
21:34:27.666584 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
21:34:27.668733 bind(3, {sun_family=AF_UNIX,
sun_path="/tmp/proxy.bhv.dns.current"}, 110) = 0
21:34:27.671519 write(2, "server: socket bound at /usr/lib"..., 75) = 75

21:34:27.675951 listen(3, 128)          = 0
21:34:27.677483 accept(3, {sun_family=AF_UNIX, sun_path=""}, [3]) = 4
21:34:27.886664 fcntl(4, F_GETFL)       = 0x2 (flags O_RDWR)
21:34:27.887923 fstat(4, {st_mode=S_IFSOCK, st_size=0, ...}) = 0
21:34:27.889136 mmap(0, 1024, PROT_READ|PROT_WRITE, MAP_PRIVATE|0x20,
4294967295, 0) = 0x400e2000
21:34:27.890518 lseek(4, 0, SEEK_CUR)   = -1 ESPIPE (Illegal seek)
21:34:27.891823 fcntl(4, F_GETFL)       = 0x2 (flags O_RDWR)
21:34:27.893051 fstat(4, {st_mode=S_IFSOCK, st_size=0, ...}) = 0
21:34:27.894267 mmap(0, 1024, PROT_READ|PROT_WRITE, MAP_PRIVATE|0x20,
4294967295, 0) = 0x400e3000
21:34:27.895629 lseek(4, 0, SEEK_CUR)   = -1 ESPIPE (Illegal seek)
21:34:27.897160 write(2, "server: connected at /usr/lib/ht"..., 72) = 72

21:34:27.898662 read(4, "get\n", 1024)  = 4
21:34:27.900529 write(2, "server: got cmd |get| at /usr/li"..., 94) = 94

21:34:27.933480 write(2, "received \'get\' command at /usr"..., 96) = 96

21:34:27.935538 write(4, "dns port 47\n", 12) = 12
21:34:27.942435 write(4, "dns deny 172.16.112.*\n", 22) = 22
21:34:27.947424 write(4, "dns deny 11.1.2.*\n", 18) = 18
21:34:27.952628 write(4, "dns allow rl.af.mil\n", 20) = 20
21:34:27.958037 write(4, "dns allow sprintmail.com\n", 25) = 25
21:34:27.962989 write(4, "dns allow 10.0.0.*\n", 19) = 19
21:34:27.967905 write(4, "dns allow 192.52.112.*\n", 23) = 23
21:34:27.972786 write(4, "dns allow 146.153.100.*\n", 24) = 24
21:34:27.977695 write(4, "EOF\n", 4)    = 4
21:34:28.045846 open("/usr/share/locale/C/LC_MESSAGES", O_RDONLY) = -1
ENOENT (No such file or directory)
21:34:28.047809 stat("/etc/locale/C/libc.cat", 0xbffff630) = -1 ENOENT
(No such file or directory)
21:34:28.049305 stat("/usr/lib/locale/C/libc.cat", 0xbffff630) = -1
ENOENT (No such file or directory)
21:34:28.050809 stat("/usr/lib/locale/libc/C", 0xbffff630) = -1 ENOENT
(No such file or directory)
21:34:28.052248 stat("/usr/share/locale/C/libc.cat", 0xbffff630) = -1
ENOENT (No such file or directory)
21:34:28.053670 stat("/usr/local/share/locale/C/libc.cat", 0xbffff630) =
-1 ENOENT (No such file or directory)
21:34:28.055625 write(2, "server: web page serve results: "..., 118) =
118
21:34:28.057485 write(2, "server: shutdown remote end in l"..., 123) =
123
21:34:28.059061 shutdown(4, 2 /* send and receive */) = 0
21:34:28.060235 close(4)                = 0
21:34:28.061850 munmap(0x400e3000, 1024) = 0
21:34:28.063035 close(4)                = -1 EBADF (Bad file number)
21:34:28.064094 munmap(0x400e2000, 1024) = 0
21:34:28.065415 accept(3,

(server still waiting when I dumped this)


Here's the strace for the client, starting from the point where it gets
the socket:

21:34:27.848938 socket(PF_UNIX, SOCK_STREAM, , 0) = 3
21:34:27.851107 fcntl(3, F_GETFL)       = 0x2 (flags O_RDWR)
21:34:27.852355 fstat(3, {st_mode=S_IFSOCK, st_size=0, ...}) = 0
21:34:27.853503 mmap(0, 1024, PROT_READ|PROT_WRITE, MAP_PRIVATE|0x20,
4294967295, 0) = 0x400dc000
21:34:27.854898 lseek(3, 0, SEEK_CUR)   = -1 ESPIPE (Illegal seek)
21:34:27.856019 fcntl(3, F_GETFL)       = 0x2 (flags O_RDWR)
21:34:27.857167 fstat(3, {st_mode=S_IFSOCK, st_size=0, ...}) = 0
21:34:27.858291 mmap(0, 1024, PROT_READ|PROT_WRITE, MAP_PRIVATE|0x20,
4294967295, 0) = 0x400e1000
21:34:27.859546 lseek(3, 0, SEEK_CUR)   = -1 ESPIPE (Illegal seek)
21:34:27.861615 connect(3, {sun_family=AF_UNIX,
sun_path="/tmp/proxy.bhv.dns.current"}, 110) = 0
21:34:27.864031 write(3, "get\n", 4)    = 4
21:34:27.865835 open("/usr/share/locale/C/LC_MESSAGES", O_RDONLY) = -1
ENOENT (No such file or directory)
21:34:27.867614 stat("/etc/locale/C/libc.cat", 0xbffff630) = -1 ENOENT
(No such file or directory)
21:34:27.869005 stat("/usr/lib/locale/C/libc.cat", 0xbffff630) = -1
ENOENT (No such file or directory)
21:34:27.870349 stat("/usr/lib/locale/libc/C", 0xbffff630) = -1 ENOENT
(No such file or directory)
21:34:27.880454 stat("/usr/share/locale/C/libc.cat", 0xbffff630) = -1
ENOENT (No such file or directory)
21:34:27.881938 stat("/usr/local/share/locale/C/libc.cat", 0xbffff630) =
-1 ENOENT (No such file or directory)
21:34:27.883732 write(2, "client: set \'get\' command: Ill"..., 92) = 92

21:34:27.885238 read(3, "dns port 47\n", 1024) = 12
21:34:27.937807 write(2, "read line |dns port 47| at /usr/"..., 92) = 92

21:34:27.940949 read(3, "dns deny 172.16.112.*\n", 1024) = 22
21:34:27.944285 write(2, "read line |dns deny 172.16.112.*"..., 102) =
102
21:34:27.946069 read(3, "dns deny 11.1.2.*\n", 1024) = 18
21:34:27.949349 write(2, "read line |dns deny 11.1.2.*| at"..., 98) = 98

21:34:27.951060 read(3, "dns allow rl.af.mil\n", 1024) = 20
21:34:27.954454 write(2, "read line |dns allow rl.af.mil| "..., 100) =
100
21:34:27.956654 read(3, "dns allow sprintmail.com\n", 1024) = 25
21:34:27.959909 write(2, "read line |dns allow sprintmail."..., 105) =
105
21:34:27.961645 read(3, "dns allow 10.0.0.*\n", 1024) = 19
21:34:27.964805 write(2, "read line |dns allow 10.0.0.*| a"..., 99) = 99

21:34:27.966473 read(3, "dns allow 192.52.112.*\n", 1024) = 23
21:34:27.969721 write(2, "read line |dns allow 192.52.112."..., 103) =
103
21:34:27.971440 read(3, "dns allow 146.153.100.*\n", 1024) = 24
21:34:27.974601 write(2, "read line |dns allow 146.153.100"..., 104) =
104
21:34:27.976275 read(3, "EOF\n", 1024)  = 4
21:34:27.979593 shutdown(3, 2 /* send and receive */) = 0
21:34:27.985305 close(3)                = 0
21:34:27.986881 munmap(0x400e1000, 1024) = 0
21:34:27.987968 close(3)                = -1 EBADF (Bad file number)
21:34:27.988968 munmap(0x400dc000, 1024) = 0
21:34:27.990476 fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
21:34:27.991750 mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|0x20,
4294967295, 0) = 0x400dc000
21:34:27.993297 write(1, "Content-type: text/html\n\n<html"..., 609) =
609
21:34:28.015609 write(1, "<hr><small>&copy;1998 Minuteman "..., 118) =
118
21:34:28.017168 sigprocmask(SIG_SETMASK, [], NULL) = 0
21:34:28.027590 sigprocmask(SIG_BLOCK, NULL, []) = 0
21:34:28.029898 _exit(0)                = ?


And here's the strace of a non-socketized CGI-generated web page.  Note
the placement of the sigprocmask() system calls, relative to the
write()s to STDOUT.  (Is this a red herring?)

21:22:07.050838 --- SIGALRM (Alarm clock) ---
21:22:07.056388 sigreturn()             = ? (mask now [ALRM])
21:22:07.058621 time(NULL)              = 904008127
21:22:07.059628 sigaction(SIGALRM, {SIG_DFL}, NULL) = 0
21:22:07.060692 alarm(0)                = 0
21:22:07.066741 sigprocmask(SIG_SETMASK, [], NULL) = 0
21:22:07.067814 time([904008127])       = 904008127
21:22:07.070153 fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
21:22:07.071473 mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|0x20,
4294967295, 0) = 0x400dc000
21:22:07.073785 sigprocmask(SIG_SETMASK, [], NULL) = 0
21:22:07.087147 sigprocmask(SIG_BLOCK, NULL, []) = 0
21:22:07.089414 write(1, "Content-type:
text/html\n\n<html>\n<title>Minuteman I.S.T. Firewall
Frontpage</title><body><center><h1>Minuteman I.S.T. Firewall
Frontpage</h1><hr>\n<form method=post
action=\"http://localhost/cgi-bin/hardware_setup\">\n<input type=submit
value=\"Hardware"..., 735) = 735
21:22:07.092376 _exit(0)                = ?





------------------------------

Date: Tue, 25 Aug 1998 02:09:59 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Perl compiler
Message-Id: <X1pE1.2$x8.17281@nsw.nnrp.telstra.net>

In article <slrn6u44q0.t6i.sholden@pgrad.cs.usyd.edu.au>,
	sholden@pgrad.cs.usyd.edu.au (Sam Holden) writes:

> Usenet is also a community of people who tend to have a open and
> sharing mentallity, that probably arises from the fact that that was
> how the computing world was way back when...

Usenet _used to_ be a community of people that tend to have an open
and sharing mentality. The question that started this thread shows you
that that is no longer the case :( Only a small subset of Usenet users
nowadays still has that mentality.

Martien
-- 
Martien Verbruggen                      |
Webmaster www.tradingpost.com.au        | "In a world without fences,
Commercial Dynamics Pty. Ltd.           |  who needs Gates?"
NSW, Australia                          |


------------------------------

Date: 25 Aug 1998 03:15:40 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl compiler
Message-Id: <6rta8s$1t2$2@client3.news.psi.net>

Craig Berry (cberry@cinenet.net) wrote on MDCCCXX September MCMXCIII in
<URL: news:6rt1jv$9fu$1@marina.cinenet.net>:
++ 
++ 
++ Science is not a fair comparison.  Science is (in the ideal sense) about
++ the quest for Truth, for the secrets of the world in which we live.  It
++ strives toward a culture of openness and sharing.  Perl is a tool used (by
++ many -- or most -- of us) in our daily, grubby quest for money.  We happen
++ to love it, and enjoy using it, but money drives the process, by and
++ large. 

Then don't come here for free advice on hiding your petty source code.
That makes you into a selfish person.

++ In my daily work and play, I use both freeware and proprietary, paid-for
++ software.  I find that both have useful roles.  I've yet to find a word
++ processor that suits my needs better than Microsoft Word on WinNT; I've
++ yet to find a C++ development toolset I like better than Gnu's.  I've seen
++ plenty of bad freeware and good payware.  The correlation between quality
++ and freeness is slight if it exists, and I'd hesitate to guess on its
++ sign.

The question isn't how much free software do you use, the question is,
what do you contribute to the free software world? Tom's contribution
is enormous, only a hand ful of people match his contribution.

++ : I do not wish you luck, because I am morally opposed to the choice you
++ : are attempting to make.
++ 
++ I'll be interested to see the moral system that leads to this extreme a
++ position...

It's called "common sense".



Abigail
-- 
And just as you're under no obligation to publish your source code to
please me, I'm under no obligation to help you hide it.
                   [Russ Allbery in `The new Camel and compiling perl'
                    <news:qumohhwo6gz.thoron@cyclone.stanford.edu>]


------------------------------

Date: Mon, 24 Aug 1998 22:37:20 -0400
From: "Matthew O. Persico" <mpersico@erols.com>
Subject: Re: Perl documentation
Message-Id: <35E22360.B60C3A35@erols.com>

DUUUUUUUH! Big ol' V8 Slap to my forehead!

I've been working NT too long. Sorry!

Russ Allbery wrote:
> 
> Matthew O Persico <mpersico@erols.com> writes:
> 
> > 3) Someone needs to write 'nroff2html'. The perl installation could
> > simply translate the whole man tree or grep the perl pod for man refs
> > and just translate those. Voila! HTML'd man pages and live links in the
> > perl docs.
> 
> nroff2html has already been written, actually; it's called rman.
> 
> --
> #!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
> $^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
>  00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
> rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print

-- 
#!/usr/bin/perl -- Matthew O. Persico
print "Just Another Perl Neophyte\n";
## Simplicity is a blessing when you're 
## supporting the program at 2AM


------------------------------

Date: Mon, 24 Aug 1998 22:39:18 -0400
From: "Matthew O. Persico" <mpersico@erols.com>
Subject: Re: Perl documentation
Message-Id: <35E223D6.63D96443@erols.com>

Flames are fun to watch when I'm downloading four or five files at a
time. Nuthin' better to do.

Mark-Jason Dominus wrote:
> 
> In article <35E176E8.A5CE1E84@dead.end.com>,  <no.uce@dead.mailbox.com> wrote:
> >meet with all the abusive repliers at the Perl conference - James Manson?
> 
> Ah, yes, the notorious brother of Charles Manson.
> 
> He was speaking on Wednesday about the Perl interface module for the
> X.25 protocol, IIRC.
> 
> >I think the prob with the "gurus"
> 
> I think the problem with you is that you're too lazy to think about
> what you really mean, and that's why you end up criticizing a lot of
> helpful people who don't deserve it.

-- 
#!/usr/bin/perl -- Matthew O. Persico
print "Just Another Perl Neophyte\n";
## Simplicity is a blessing when you're 
## supporting the program at 2AM


------------------------------

Date: Tue, 25 Aug 1998 03:57:20 GMT
From: dhawker@bigfoot.com (David Hawker)
Subject: Re: Perl documentation
Message-Id: <35e53294.11586626@news.cableol.net>

On 23 Aug 1998 23:02:14 GMT, abigail@fnx.com (Abigail) felt the need to
post:

>David Hawker (dhawker@bigfoot.com) wrote on MDCCCXVIII September MCMXCIII
>in <URL: news:35e53e7f.14559031@news.cableol.net>:
>++ On Sat, 22 Aug 1998 17:51:41 -0700, lr@hpl.hp.com (Larry Rosler) felt the
>++ need to post:
>++ 
>++ >[Posted to comp.lang.perl.misc and copy mailed.]
>++ >
>++ >In article <6rnmno$8na$2@client3.news.psi.net> on 23 Aug 1998 00:11:36 
>++ >GMT, Abigail <abigail@fnx.com> says...
>++ >...
>++ >> Uhm, what system comes without documentation for its system calls?
>++ 
>++ The one I'm using: MS-DOS and Windows95.
>
>Then complain to the vendors for shipping a system without documentation.

I don't expect the vendors to bundle the interrupt guides, assembly
language FAQs, windows api details, etc etc with a home computer.... maybe
if I was buying one from a university for studying computing (which
incidentally I shall be doing in a few weeks) but not from a high street
store.

>Would you buy a TV without a manual too, and then complain the TV guide
>doesn't have instructions on how to operate your TV?

No, that's not the point. I can get the docs I want - it's just an
inconvenient and costly way of getting them. I'd rather have them all in
one place, on my hard disk :) I'll get to work on finding the UNIX manpages
all packaged up.

Any more advice for my setuid problem? Remember that?

--
dhawker@bigfoot.com | ICQ 7222349
http://dhawker.home.ml.org


------------------------------

Date: Tue, 25 Aug 1998 03:57:17 GMT
From: dhawker@bigfoot.com (David Hawker)
Subject: Re: Perl documentation
Message-Id: <35e634c1.12144055@news.cableol.net>

On Mon, 24 Aug 1998 09:59:54 -0500, fl_aggie@thepentagon.com (I R A Aggie)
felt the need to post:

>In article <35e03875.13012150@news.cableol.net>,
>david.hawker@removethis.cableol.co.uk wrote:
>
>+ There was no big sign saying 'you can find out about foreach in perlsyn' -
>+ the obvious place that struck me was perlfunc, as these (for/foreach) are
>+ words and can be misinterpreted as functions by people who aren't as expert
>+ on perl as those who make it or write the manuals.
>
>They're a control loop, not a function.

I know that now, I didn't before. Thanks.

I *could* have been more thorough and searched everything in the perldoc
directory tree for "foreach" but then there'd have been less activity in
this bustling newsgroup, one less question that may have answered the query
of a thousand newbies reading the group.

>+ I regard syntax as the way perl is written - not the function of the words
>+ "for/foreach"
>
>I believe your question can be restated as "what is the SYNTAX of a foreach
>loop?"

Maybe.

>+ I'm not after perl documentation - that seems to be all present in the docs
>+ I already have - rather I am after documentation on Linux/UNIX. Try reading
>+ my question again and the replies to the thread.
>
>Pick your favorite web search engine, and try something like "man localtime".

Thanks.

>Of course, you could just pick up a copy of the linux doc set...

What exactly is that?

>James - of course, its probably in a 'weird' format, so that may not do
>        you any good...

If it is, I can always use perl to convert it, can't I? :)

--
dhawker@bigfoot.com | ICQ 7222349
http://dhawker.home.ml.org


------------------------------

Date: Tue, 25 Aug 1998 03:57:23 GMT
From: dhawker@bigfoot.com (David Hawker)
Subject: Re: Perl documentation
Message-Id: <35e4325a.11528910@news.cableol.net>

On Mon, 24 Aug 1998 02:29:42 -0400, "John Mason Jr" <masonj@erols.com> felt
the need to post:

>David,
>  You might find the new version of perl from Activestate useful it has all
>the docs in one place.

What about the docs for UNIX system calls? All the UNIX functions that
aren't documented in the perl docs?

--
dhawker@bigfoot.com | ICQ 7222349
http://dhawker.home.ml.org


------------------------------

Date: Mon, 24 Aug 1998 22:17:33 -0500
From: "Michael D. Schleif" <mds-resource@mediaone.net>
Subject: Re: Perl FAR version 1.1.1 MAKE SURE YOU READ THIS BEFORE POSTING
Message-Id: <35E22CCD.F9E374A7@mediaone.net>

Yet, isn't it just a tad bit odd that several Perl _gods_ continue to
lurk herein, notwithstanding the _mediocre_ questions posted?

Maybe, this should be re-labeled the _S_M_ forum ???

Andrew M. Kuchling wrote:
> 
> no.unsoliciteds@dead.end.com writes:
> > What do _you_ think this news group exists for?
> 
>         You can see this sort of environment in many forums, from
> linux-kernel to perl5-porters to python-list to gimp-developers to
> lynx-dev.  Experienced programmers can always find *something* to
> discuss; because they know more, they have a wider range of topics to
> choose from.  Discussion forums need to walk a fine line; newbie
> questions, while usually simple and quickly answered, sometimes spark
> interesting higher-level discussions.  Too many newbie questions,
> though, send the gurus off in search of somewhere more interesting.
> (Not a lot of deep discussion of Linux kernel design takes place in
> comp.os.linux.* any more.)

-- 

Best Regards,

mds
mds resource
888.250.3987

"Dare to fix things before they break . . . "

"Our capacity for understanding is inversely proportional to how much we
think we know.  The more I know, the more I know I don't know . . . "


------------------------------

Date: 25 Aug 1998 12:25:55 +1000
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: Prime numbers [was Re: here's an implementation of diff in perl]
Message-Id: <6rt7bj$co0$1@godzilla.zeta.org.au>

In <6rsbgn$egn$2@marina.cinenet.net> cberry@cinenet.net (Craig Berry) writes:

[...]

>Yes, but don't they all reduce to culling the list of potential factors,
>which I mentioned as the only available optimization?  (That's my
>understanding, but I'm not a mathematician; if not, I'll do my Emily
>Latella imitation.)

Not at all.  You can do probablistic tests based on the properties of
primes.  Examples include the Rabin-Miller test (to complex to explane
here).  You can also make tests based on Fermats little theorem.  

The fact that it is easyer to test primness then to factorise a number is
the underpinning assumtion of the RSA encrytion algorthum.  If this where
not the case RSA would be more or less useless because key generation
would take alsmot as long as key testing.



------------------------------

Date: Tue, 25 Aug 1998 02:53:30 GMT
From: miker3@ix.netcom.com (Michael Rubenstein)
Subject: Re: Prime numbers [was Re: here's an implementation of diff in perl]
Message-Id: <35e72227.82146680@nntp.ix.netcom.com>

On 24 Aug 1998 18:30:47 GMT, cberry@cinenet.net (Craig Berry) wrote:

>M.J.T. Guy (mjtg@cus.cam.ac.uk) wrote:
>: Craig Berry <cberry@cinenet.net> wrote:
>: >
>: >The only way to detect prime-ness is to divide by all potential factors
>: >and get a remainder on each.
>: 
>: False.   All modern (and even some quite ancient) methods use quite
>: different approaches to determine primality or to factorise.
>
>Yes, but don't they all reduce to culling the list of potential factors,
>which I mentioned as the only available optimization?  (That's my
>understanding, but I'm not a mathematician; if not, I'll do my Emily
>Latella imitation.)

No.  In general, it is much easier to determine if a large number is
prime than to find a nontrivial factor.  Modern methods often
determine that a number is composite, but give no hint of a factor.
--
Michael M Rubenstein


------------------------------

Date: Mon, 24 Aug 1998 22:13:05 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: subsorting a report
Message-Id: <comdog-ya02408000R2408982213050001@news.panix.com>
Keywords: from just another new york perl hacker

In article <35E1EE7F.E2B5F32E@home.net>, Alan Melton <arm@home.net> posted:

>Would like to sort report on $sku
>
>or do a double sort, first on date, then on sku.
>
>and get subtotals after a break on each sort.

perhaps you'd like to see the answer to

   How do I sort an array by (anything)?

in perlfaq4.

good luck :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers needs volunteers! <URL:http://www.pm.org/to-do.html>


------------------------------

Date: Mon, 24 Aug 1998 20:10:56 -0700
From: "John A. Hempe" <jhempe@crossroute.com>
Subject: Win32::OLE question
Message-Id: <6rtah5$q7u$1@pornstorm.geo.net>

Hey, when trying to Invoke a methods on a valid OLE object in Perl 5, I'm
having some problems with poorly documented objects (Microsoft's fault).  Is
there any way of getting the Perl object to barf out all possible method
names defined upon it?  (And their parameters, if possible).

Can you get at the hash or something?  I'm not Perl-erudite enough to know
how to dig this deep.

Thanks

--John Hempe





------------------------------

Date: Mon, 24 Aug 1998 22:08:46 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Y2K Date Support
Message-Id: <comdog-ya02408000R2408982208460001@news.panix.com>
Keywords: from just another new york perl hacker

In article <35E21BF4.6B46@arrowweb.com>, mhanson@arrowweb.com posted:

>How do you get the date and allow it to support the Year 2000? I have
>been using the following code but it only goes to 1999.

reread the output of

   perldoc -f localtime

good luck :)

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers needs volunteers! <URL:http://www.pm.org/to-do.html>


------------------------------

Date: Tue, 25 Aug 1998 02:21:47 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Y2K Date Support
Message-Id: <%cpE1.3$x8.17281@nsw.nnrp.telstra.net>

In article <35E21BF4.6B46@arrowweb.com>,
	Mike <mhanson@arrowweb.com> writes:
> How do you get the date and allow it to support the Year 2000? I have
> been using the following code but it only goes to 1999.

Why don't you read the documentation? Why didn't you read one of the
articles about this that gets posted about every week? Use dejanews.
Use the documentation.

> ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);

> $date = "$days[$wday], $months[$mon] $mday, 19$year at $hour\:$min\:$sec";

# perldoc -f localtime
[snip]
Also, $year is the number ofyears since 1900, that is, $year is 123 in
year 2023.
[snip]

In which way is this not totally clear?

Martien
-- 
Martien Verbruggen                      |
Webmaster www.tradingpost.com.au        | "In a world without fences,
Commercial Dynamics Pty. Ltd.           |  who needs Gates?"
NSW, Australia                          |


------------------------------

Date: Mon, 24 Aug 1998 22:08:09 -0500
From: GREGORY GILLELAND <gregory@bit.csc.lsu.edu>
Subject: Yes, someone else in need of PERL help
Message-Id: <Pine.ULT.3.94.980824214843.15167A-100000@bit.csc.lsu.edu>

I have read a majority of the last 400 posts, I have searched the internet
and found numerous FAQs and tutorials, and I have tried for 5 hours to
implement this myself... that being said, I need help.
If you would like to email me suggestions, I would appreciate it
immensely. If you would like to vent your daily frustrations on me or
inflate your monstrous ego, then so-be-it. But do it on the forum so the
nice people can see your generous comments (dont junk my box with it).

Ok, 
I would have thought this very easy but it isn't working out that way.
I want to perform the following task using PERL:

--open up a predefined file, read in the 3rd line, close the file.
--check that string to another predefined string
--if the strings ARE equal then <do something... (i can do this)>

Everything is properly working. No server errors. I got the file to open
and close, I have read in the predefined string from a FORM (and tested it
by printing to file), but I cant get the reading of the third line to work
or subsequently the string comparison. If you need more info, please
email.
Thanks in Advance,
Gregory Gilleland



------------------------------

Date: Tue, 25 Aug 1998 03:37:44 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Yes, someone else in need of PERL help
Message-Id: <ckqE1.69$Ed2.916602@shore>

GREGORY GILLELAND (gregory@bit.csc.lsu.edu) wrote:

: If you would like to email me suggestions, I would appreciate it
: immensely. If you would like to vent your daily frustrations on me or
: inflate your monstrous ego, then so-be-it. But do it on the forum so the

"Please help me dear soul and shut up too, if you please."  Very well.

: Everything is properly working. 

>From the command line?

: I got the file to open and close, 

Are you error checking with die?  Are you checking your server's logs?
How are you trying to find the record in the file?

: If you need more info, please email.

Please post some code for everyone to look at.

--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>


------------------------------

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 3531
**************************************

home help back first fref pref prev next nref lref last post