[24318] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6510 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon May 3 15:52:35 2004

Date: Mon, 3 May 2004 11:10:10 -0700 (PDT)
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, 3 May 2004     Volume: 10 Number: 6510

Today's topics:
    Re: need help with security <mark.clements@kcl.ac.uk>
    Re: need help with security <bik.mido@tiscalinet.it>
    Re: need help with security <noreply@gunnar.cc>
    Re: need help with security <ittyspam@yahoo.com>
    Re: need help with security <Juha.Laiho@iki.fi>
    Re: need help with security <Juha.Laiho@iki.fi>
    Re: need help with security <webmaster @ infusedlight . net>
        PDL code <ohlund@woodwrecker.com>
        perlboot problem <agw@cs.columbia.edu>
    Re: perlboot problem <uri@stemsystems.com>
    Re: perlboot problem <trammell+usenet@hypersloth.invalid>
        Please help with FormMail (fastjack)
    Re: Please help with FormMail (Walter Roberson)
    Re: problem with redirect in CGI ctcgag@hotmail.com
    Re: single-byte values (Don Stock)
    Re: What happend to www.perldoc.com?? <1usa@llenroc.ude>
    Re: What happend to www.perldoc.com?? (Geekatron)
    Re: Why doesn't this work? <remorse@partners.org>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 03 May 2004 11:43:39 +0100
From: Mark Clements <mark.clements@kcl.ac.uk>
Subject: Re: need help with security
Message-Id: <4096225b$1@news.kcl.ac.uk>

Sam Holden wrote:

>>my $rootfile =
>>$rootfile =~ s/.+\///;
>>
>>what is this supposed to be doing?
> Delete everything other than the filename (ie. getting the basename
> of a path). Of course it doesn't work for paths containing newlines.
s/// returns the number of substitutions, though in this case since /g 
isn't specified it will only ever return 0 or 1, so $rootfile is set to 
0 or 1.

>>why are you using files when your needs would be much better served with 
>>a proper database?
> How are files not a "proper" database?
OK - you can do it that way but using an RDBMS of some description has 
many advantages over reading and writing files directly.

Mark


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

Date: Mon, 03 May 2004 15:52:05 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: need help with security
Message-Id: <pvdc90h3md13gb3iq5v0r4ee0ldl7dh2um@4ax.com>

On Mon, 03 May 2004 11:43:39 +0100, Mark Clements
<mark.clements@kcl.ac.uk> wrote:

>>>$rootfile =~ s/.+\///;
>>>
>>>what is this supposed to be doing?
>> Delete everything other than the filename (ie. getting the basename
>> of a path). Of course it doesn't work for paths containing newlines.
>s/// returns the number of substitutions, though in this case since /g 
>isn't specified it will only ever return 0 or 1, so $rootfile is set to 
>0 or 1.

Huh?!?

'=~' ne '=';


Michele
-- 
you'll see that it shouldn't be so. AND, the writting as usuall is
fantastic incompetent. To illustrate, i quote:
- Xah Lee trolling on clpmisc,
  "perl bug File::Basename and Perl's nature"


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

Date: Mon, 03 May 2004 15:51:38 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: need help with security
Message-Id: <c75j0q$idv1o$1@ID-184292.news.uni-berlin.de>

Michele Dondi wrote:
> On Mon, 03 May 2004 11:43:39 +0100, Mark Clements 
> <mark.clements@kcl.ac.uk> wrote:
> 
>>>> $rootfile =~ s/.+\///;
>>>> 
>>>> what is this supposed to be doing?
>>> 
>>> Delete everything other than the filename (ie. getting the
>>> basename of a path). Of course it doesn't work for paths
>>> containing newlines.
>> 
>> s/// returns the number of substitutions, though in this case
>> since /g isn't specified it will only ever return 0 or 1, so
>> $rootfile is set to 0 or 1.
> 
> Huh?!?
> 
> '=~' ne '=';

Never snip code that is needed for context. :)

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



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

Date: Mon, 3 May 2004 10:05:43 -0400
From: Paul Lalli <ittyspam@yahoo.com>
Subject: Re: need help with security
Message-Id: <20040503100433.W1160@dishwasher.cs.rpi.edu>

On Mon, 3 May 2004, Michele Dondi wrote:

> On Mon, 03 May 2004 11:43:39 +0100, Mark Clements
> <mark.clements@kcl.ac.uk> wrote:
>
> >>>$rootfile =~ s/.+\///;
> >>>
> >>>what is this supposed to be doing?
> >> Delete everything other than the filename (ie. getting the basename
> >> of a path). Of course it doesn't work for paths containing newlines.
> >s/// returns the number of substitutions, though in this case since /g
> >isn't specified it will only ever return 0 or 1, so $rootfile is set to
> >0 or 1.
>
> Huh?!?
>
> '=~' ne '=';

You clipped the important part.  The original was:

> >>>my $rootfile =
> >>>$rootfile =~ s/.+\///;

He's assigning the result of the substitution back to the original
variable.

Paul Lalli


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

Date: Mon, 03 May 2004 15:52:03 GMT
From: Juha Laiho <Juha.Laiho@iki.fi>
Subject: Re: need help with security
Message-Id: <c75pma$d6t$1@ichaos.ichaos-int>

"Robin" <robin @ infusedlight.net> said:
>"Mark Clements" <mark.clements@kcl.ac.uk> wrote in message
>news:40959a87$1@news.kcl.ac.uk...
>> open (COUNT, ">$countfile") or push (@errors, "An error occured during
>> posting: couldn't open count file.");
>> flock (COUNT, LOCK_EX) or push (@errors, "An error occured during
>> posting: couldn't lock count file.");
>>
>> your open fails and you save the error (but not $!, which would tell you
>> what the error is), yet you still continue to the flock. why?
>
>If the open fails, the flock will fail so why not try it and then the error
>output will come into play. With the new one it does include $!.

(didn't bother to read the original code, so just commenting on the above,
and speculating beyond it)

If the open fails, how much anything useful will your script do beyond
the point quoted above? If this file is some kind of counter telling
how many entries there are in your blog, then you cannot allow the
actual article to be written either, if writing the count fails -- so
apparently there's not much useful the script can do if the count fails -
more or less all it can do is generate several error messages instead of
one.
-- 
Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
         PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)


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

Date: Mon, 03 May 2004 15:57:02 GMT
From: Juha Laiho <Juha.Laiho@iki.fi>
Subject: Re: need help with security
Message-Id: <c75ptm$d6t$2@ichaos.ichaos-int>

"Robin" <robin @ infusedlight.net> said:
>Sorry about my formatting, I use an editor that screws it all up.

I think suggested already, but wouldn't it be time to switch to some
other editor then? User-unfriendliness and proper indentation are not
contradictory features in an editor - you can apparently have both in
one editor (though the editor I tend to use isn't famed for its user-
friendliness, so I'm not going to recommend it here).
-- 
Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
         PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)


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

Date: Mon, 3 May 2004 08:13:16 -0800
From: "Robin" <webmaster @ infusedlight . net>
Subject: Re: need help with security
Message-Id: <c75r8e$b6j$1@reader2.nmix.net>


"Sam Holden" <sholden@flexal.cs.usyd.edu.au> wrote in message
news:slrnc9b91c.r58.sholden@flexal.cs.usyd.edu.au...
> On Mon, 03 May 2004 02:04:07 +0100,
> Mark Clements <mark.clements@kcl.ac.uk> wrote:
> > Robin wrote:
> >> Someone posted an unathorized post to my blog, if someone has
time...could
> >> you check this out, http://www.infusedlight.net/robin/temp/blog.txt and
> >> point out the security problems??
> > quick read (can't be arsed to consider the security problems):
> >
> > my $rootfile =
> > $rootfile =~ s/.+\///;
> >
> > what is this supposed to be doing?

it looked like $rootfile = $0;  $rootfile =~ s/.+\///;
-Robin





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

Date: 03 May 2004 14:00:11 EDT
From: Mark Ohlund <ohlund@woodwrecker.com>
Subject: PDL code
Message-Id: <ofdim1-bn5.ln1@news.woodwrecker.com>

I'm trying to use the PDL modules to perform a Vector Space search as 
shown in: http://www.perl.com/pub/a/2003/02/19/engine.html

I'm running FreeBSD 4.9 w/ Perl 5.6.1 and 2.4.1 of PDL.

The source code for the search is: 
http://www.perl.com/2003/02/19/examples/VectorSpace.pm

I'm calling this with the following code:

#!/usr/bin/perl

use Search::VectorSpace;

my @docs = ("the cat in the hat.", "A cat is a fine pet.",
             "Dogs and cats make good pets.", "I haven't got a hat.");
my $engine = Search::VectorSpace->new( docs => \@docs, threshold => .04);
$engine->build_index();

while ( my $query = <STDIN> ) {
     my %results = $engine->search( $query );
     print join "\n>>", keys %results;
}

When I call the VectorSpace code, I get an error at line 180:

Can't modify non-lvalue subroutine call in concatenation (.) or string 
at /usr/local/lib/perl5/5.6.1/Search/VectorSpace.pm line 180, near "$value;"

Line 180 is:

index( $vector, $offset ) .= $value;

I *think* the problem is that rather than using the PDL index function 
which should set the value of the PDL vector object at $offset to 
$value, Perl thinks I'm trying to access the intrinsic Perl index 
function. I've tried prefacing the index call with PDL:: to no avail.

Does anyone have insight into what I may be doing wrong? I'll admit my 
Perl is pretty rusty, but making use of this search would be a big help. 
Thanks.

Mark.


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

Date: 03 May 2004 12:26:25 -0400
From: Art Werschulz <agw@cs.columbia.edu>
Subject: perlboot problem
Message-Id: <yla4qqxo4su.fsf@sobolev.cs.columbia.edu>

Hi.

I'm having a problem with "A horse of a different color", found towards the
end of the perlboot manpage.

Stripping things to the bone, here's my Perl file:

%<------%<--%<--%<---cut here---%<--%<--%<----------------------------
use strict vars;

{package Animal;
 sub speak {
  my $either = shift;
  print $either->name, " goes ", $either->sound, "!\n";
 }

 sub new {
   my $class = shift;
   my $name = shift;
   my $self = { Name => $name, Color => $class->defaultColor };
   bless \$name, $class;
 }

 sub set_color {
   $_[0]->{Color} = $_[1];
 }

}

{package Horse;
 use vars qw(@ISA);
 @ISA = qw(Animal);

 sub sound {"neigh"}

 sub defaultColor { "brown" };
}

my $talking = Horse->new("Mr. Ed");
$talking->set_color("black-and-white");
%<------%<--%<--%<---cut here---%<--%<--%<----------------------------

The problem is that the $talking->set_color statement bombs with the error
msg "Not a HASH reference at foo line 19."

Of course, I looked for typos.  I didn't see anything, but that may not
mean all that much.

I checked using Google, as well as the groups.gooogle.com archive of this
newsgroup.  Of course, there's always the possibility that my search
criteria weren't good enough.

I also used perldebug.  It didn't tell me anything too surprising:

%<------%<--%<--%<---cut here---%<--%<--%<----------------------------
main::(21:5):   {package Animal;
main::(21:6):    sub speak {
  DB<1> b Animal::set_color
  DB<2> c
Animal::set_color(21:36):           $_[0]->{Color} = $_[1];
  DB<2> x @_
0  Horse=SCALAR(0x8059ee8)
   -> 'Mr. Ed'
1  'black-and-white'
  DB<3> x @_[0]
0  Horse=SCALAR(0x8059ee8)
   -> 'Mr. Ed'
  DB<4> x @_[0]->{Color}
Not a HASH reference at (eval 5)[/usr/lib/perl5/5.8.0/perl5db.pl:17] line 2.
%<------%<--%<--%<---cut here---%<--%<--%<----------------------------  

If anybody sees what I've missed here, I would greatly appreciate it.  Many
thanks. 

-- 
Art Werschulz (8-{)}   "Metaphors be with you."  -- bumper sticker
GCS/M (GAT): d? -p+ c++ l u+(-) e--- m* s n+ h f g+ w+ t++ r- y? 
Internet: agw@cs.columbia.edu<a href="http://www.cs.columbia.edu/~agw/">WWW</a>
ATTnet:   Columbia U. (212) 939-7060, Fordham U. (212) 636-6325


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

Date: Mon, 03 May 2004 16:39:11 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: perlboot problem
Message-Id: <x7r7u1v51t.fsf@mail.sysarch.com>

>>>>> "AW" == Art Werschulz <agw@cs.columbia.edu> writes:

  AW> I'm having a problem with "A horse of a different color", found
  AW> towards the end of the perlboot manpage.

  AW> Stripping things to the bone, here's my Perl file:

  AW> %<------%<--%<--%<---cut here---%<--%<--%<----------------------------
  AW> use strict vars;

  AW> {package Animal;

you don't need that opening {. packages are file scoped or until the
next package command.

  AW>  sub speak {
  AW>   my $either = shift;
  AW>   print $either->name, " goes ", $either->sound, "!\n";
  AW>  }

  AW>  sub new {
  AW>    my $class = shift;
  AW>    my $name = shift;
  AW>    my $self = { Name => $name, Color => $class->defaultColor };
  AW>    bless \$name, $class;

you don't return $self but you bless the name. looks like a nasty little
bug right there. 

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Mon, 3 May 2004 16:47:11 +0000 (UTC)
From: "John J. Trammell" <trammell+usenet@hypersloth.invalid>
Subject: Re: perlboot problem
Message-Id: <slrnc9ctsf.ecq.trammell+usenet@hypersloth.el-swifto.com.invalid>

On 03 May 2004 12:26:25 -0400, Art Werschulz <agw@cs.columbia.edu> wrote:
>  sub new {
>    my $class = shift;
>    my $name = shift;
>    my $self = { Name => $name, Color => $class->defaultColor };
>    bless \$name, $class;
>  }

You probably want:

   bless $self, $class;



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

Date: 3 May 2004 10:15:36 -0700
From: robnhood00@aol.com (fastjack)
Subject: Please help with FormMail
Message-Id: <8696c0f6.0405030915.672efce8@posting.google.com>

Hi,
I'm using FomrMail and I'm trying to customize the html email with the
form values that a user inputs.  The form emails, but the values are
not returned. Here's the code:

In the sub send_mail I have the following:

#   USE HTML-DEFINED FORM  #
&ReadParse(*input);  
print MAIL "Name: $input{firstName} ";
print MAIL "Last Name: $input{lastName}";

#  END HTML DEFINED FORM   

I've also tried:

#   USE HTML-DEFINED FORM  #
&ReadParse(*input);  
print MAIL "<br>Name: $input{'firstName'} ";
print MAIL "<br>Last Name: $input{'lastName'}";

#  END HTML DEFINED FORM   


Results are emailed as follows:
---------------------------------------------------------------------------
email: testemail@test.com subject: WebForm Name:
Name:
Last Name:
 ---------------------------------------------------------------------------


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

Date: 3 May 2004 17:34:31 GMT
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Subject: Re: Please help with FormMail
Message-Id: <c75vr7$et8$1@canopus.cc.umanitoba.ca>

In article <8696c0f6.0405030915.672efce8@posting.google.com>,
fastjack <robnhood00@aol.com> wrote:
:In the sub send_mail I have the following:

:#   USE HTML-DEFINED FORM  #
:&ReadParse(*input);  
:print MAIL "Name: $input{firstName} ";
:print MAIL "Last Name: $input{lastName}";

You aren't putting any newline in there, so everything is going to
run together on one line.

To debug your problem, I would suggest that you temporarily add in:

print MAIL "input field $_ had value |$input{_value}|\n" foreach (keys %input);
-- 
When your posts are all alone / and a user's on the phone/
there's one place to check -- / Upstream!
When you're in a hurry / and propagation is a worry/
there's a place you can post -- / Upstream!


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

Date: 03 May 2004 16:57:57 GMT
From: ctcgag@hotmail.com
Subject: Re: problem with redirect in CGI
Message-Id: <20040503125757.824$KL@newsreader.com>

"Danny" <dannywork5@hotmail.com> wrote:
>
> My product pages are dynamic in that the product pages are genereated
> from a cgi script which we do not have access to, it is a primitive
> shopping cart. So I got it to work for froogle, but others cause an error
> when the landing page is met.  "cannot create session" which is generated
> from my shopping cart cgi.  For some reason, it does not like the
> redirect from these shopping sites and I have no idea why.  (the cart
> tech support is terrible!!).

I'll say!


> Since I could not send to a static page anywhere on the site, I figured
> cgi would help me and it has.
> I call the cgi script on my page, it spits out a basic page with just a
> header and with the <META HTTP-EQUIV=REFRESH CONTENT command to redirect
> to this url that has a call to the cgi script.  This works because I
> assume the page is being viewed on my webserver and the call to the url
> is coming from my site.

I don't think that that is quite correct.  The request is not coming from
your server (assuming the end user is not on your server, that is), the
request is coming from the end user's computer either way.  That is, either
$q->redirect or META tag causes a client-side redirect--not a server-side
redirect.  The difference (that I can see) is that the $q->redirect method
causes the newly redirected request to report the original page (froogle,
etc) as the http_referer, while the META method does not report any
http_referer at all.  I would guess your crappy shopping cart is, either
intentionally or accidentally, blocking access based on http_referer.


> The cgi redirect command does not work, and the command from Purl Guru
> (print location from thread above) did not work. I am assuming because
> this does such a quick redirect.

The redirect command does work, it is the shopping cart program that
doesn't work.  It is true that you can work around the shopping cart bugs
by using META tag rather than redirect, but that does not mean the redirect
isn't working.


> I am no perl expert, but I think I understand.
>
> Do I make sense?

Yes.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

Date: 3 May 2004 07:32:24 -0700
From: dbsx@yahoo.com (Don Stock)
Subject: Re: single-byte values
Message-Id: <8cf7ae36.0405030632.7654b5f5@posting.google.com>

> Also sprach Don Stock:

as in the ape-man discovering tools? :)


> Well, as you already noticed yourself, Perl is not C. If you want the
> NULL character, then do
> 
>     substr($x, $_, 1, "\0"), substr($y, $_, 1, "\0") for @ignore;

yeah, shortly after I woke up this morning I thought "hey, literals
have 2 types too!  I need to do a type shift!".  "chr 0" did the
trick, as does the string literal in your example.


> Also, I would probably use an appropriate unpack() pattern to handle the
> bytes to be ignored. But that's mainly because I like unpack() a lot. It
> can be generated dynamically [untested though]:

I recently was exposed to unpack for the first time, in a perl script
sent in by a customer to decompose a file.  I agree, it's very nice. 
I'll play with your example.


> Finally, only use printf() when you actually make use of its
> interpolation features. Again, Perl is not C.

by "interpolation features" you mean %d and such?  I don't see any
harm in using printf (correct me if I'm wrong).  Plus, I once ran into
a problem with "print $x" where $x contained a '%' or '@' (I don't
remember for sure) and was evaluated at that point like a hash (or
array).  So I got in the habit of always using printf ('printf
"%s\n",$x' cured it).  Except that I couldn't recreate it just now
with my new(er) version of perl, so maybe it was a bug that's gone
away.  Or maybe I simply screwed up back then.  Or who knows...

"hey buddy, toss me the upper leg bone of that antelope willya?  I
need to go get breakfast."

don


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

Date: 3 May 2004 12:08:36 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude>
Subject: Re: What happend to www.perldoc.com??
Message-Id: <Xns94DE52D76450Dasu1cornelledu@132.236.56.8>

uffesterner@spamhole.com (Rex Gustavus Adolphus) wrote in 
news:c70a85ff.0405030135.7a6504d5@posting.google.com:

> Anyone knows what happend to the www.perldoc.com site since friday???
> 
> I get redirected to https://www.perldoc.com:19638/webhost/rollout/site
> and has to install a certificate from dedicated.quantumfx.com,
> and then all I get is a "Welcome User Administrator" loginform??

Well, when I visit it using Links, I get the following:

                                                             Perl 
Documentation
                       Perldoc Website Under Construction

    The Perldoc website is in the process of moving to a new web 
server/web
   host. The website will be back online within the next few days. Sorry 
for
                                the inconvience.

                                 Carlos Ramirez

-- 
A. Sinan Unur
1usa@llenroc.ude (reverse each component for email address)


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

Date: 3 May 2004 09:21:01 -0700
From: icefalcon777@yahoo.com (Geekatron)
Subject: Re: What happend to www.perldoc.com??
Message-Id: <c924898e.0405030821.6cac5170@posting.google.com>

uffesterner@spamhole.com (Rex Gustavus Adolphus) wrote in message news:<c70a85ff.0405030135.7a6504d5@posting.google.com>...
> Anyone knows what happend to the www.perldoc.com site since friday???
> 
> I get redirected to https://www.perldoc.com:19638/webhost/rollout/site
> and has to install a certificate from dedicated.quantumfx.com,
> and then all I get is a "Welcome User Administrator" loginform??

Try http://perldoc.com. You get a more useful message:

"The Perldoc website is in the process of moving to a new web
server/web host. The website will be back online within the next few
days. Sorry for the inconvience. "

--G


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

Date: Mon, 03 May 2004 11:51:05 -0400
From: Richard Morse <remorse@partners.org>
Subject: Re: Why doesn't this work?
Message-Id: <remorse-23434A.11510503052004@plato.harvard.edu>

In article <36645806.F9726B7C@Wheat.con>, David Wheat <David@Wheat.con> 
wrote:

> I have no way to access that. It seems like the LWP is not installed
> on my host. Unless these will cause a 500 error.
> 
> #!/usr/bin/perl
> 
> LWP::UserAgent;
> 
> $ua = LWP::UserAgent->new;
> 
> $ua->proxy(['http', 'ftp'], 'http://www.domain.com/');
> $req = new HTTP::Request('GET' => 'http://www.domain.com/temp.txt');
> 
> --
> or
> --
> 
> #!/usr/bin/perl
> 
> use LWP::Simple;
> $doc = get 'http://www.domain.com/temp.txt';

Neither of these scripts is going to do what it seems like you want.  A 
'500 error', if I'm guessing correctly, is due to you not returning 
proper headers from a CGI call.

First, try to make in run on your _local_ computer (ie, not as a CGI 
script).  For instance:

   #!/usr/bin/perl
   use strict;
   use warnings;
   use LWP::Simple;

   my $doc = get 'http://www.domain.com/temp.txt';
   print $doc;

   __END__

Then you can deal with making it a CGI:

   #!/usr/bin/perl
   use strict;
   use warnings;
   use LWP::Simple;
   use CGI;

   my $doc = get 'http://www.domain.com/temp.txt';
   my $q = new CGI;
   print $q->header('text/plain');
   print $doc;

   __END__

(And yes, Ms. Gurl, I am aware that this is exceedingly inefficient.  It 
his, however, easy to understand, which it seems like the OP might need.)

Once you've done this, you can now sit down and determine how these 
differ from your above examples.

As an exercise, figure out how to make the LWP::UserAgent version work.

HTH,
Ricky

-- 
Pukku


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#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.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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.

#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 V10 Issue 6510
***************************************


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