[12036] in Perl-Users-Digest
Perl-Users Digest, Issue: 5636 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 12 05:07:14 1999
Date: Wed, 12 May 99 02:00:18 -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 Wed, 12 May 1999 Volume: 8 Number: 5636
Today's topics:
Re: [Fwd: my hands are tied] <gellyfish@gellyfish.com>
Accessing lexicals outside of scope? Any workarounds? <jbb@my-dejanews.com>
Converting a list of hashrefs to a single hashref (Johannes K. Lehnert)
Finding Total Directory Size in Perl. <nick@auger.net>
Re: Finding Total Directory Size in Perl. (Charles R. Thompson)
Re: Getting Access to Perl - how? <gellyfish@gellyfish.com>
Re: HASH AND ARRAY (Bart Lateur)
How can i create DLL from perl script ? feketeroland11@my-dejanews.com
Re: Link -> auto generated page - question <andreas73@my-dejanews.com>
Re: Link -> auto generated page - question <gellyfish@gellyfish.com>
Re: MS-HTML must die! (Larry Rosler)
Re: MS-HTML must die! <tchrist@mox.perl.com>
Re: Need a little looping help (Randal L. Schwartz)
Re: need a perl/cgi tutorial please <c4jgurney@my-dejanews.com>
Re: need a perl/cgi tutorial please tertullian@my-dejanews.com
need script to debug web server links... <j@org>
Re: PWS and Perl <bryan84@singnet.com.sg>
Re: refreshing frame after CGI (Charles R. Thompson)
Thanks guys, you saved my life :-) <daniel.vesma@thewebtree.com>
Re: Using Perl to fetch web pages, POST method, help? smnayeem@my-dejanews.com
Re: Using Perl to fetch web pages, POST method, help? <gellyfish@gellyfish.com>
Why no Net::FTP with ActivePerl? leonandrews@my-dejanews.com
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 12 May 1999 09:38:21 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: [Fwd: my hands are tied]
Message-Id: <37393dfd@newsread3.dircon.co.uk>
Greg Bartels <gbartels@xli.com> wrote:
> This message is in MIME format. Since your mail reader does not understand
> this format, some or all of this message may not be legible.
>
> ------_=_NextPart_000_01BE9C0B.6B0BA090
> Content-Type: text/plain;
> charset="iso-8859-1"
>
Oh well thats a bummer ...
/J\
--
Jonathan Stowe <jns@gellyfish.com>
------------------------------
Date: Wed, 12 May 1999 08:22:18 GMT
From: Julien B Beasley <jbb@my-dejanews.com>
Subject: Accessing lexicals outside of scope? Any workarounds?
Message-Id: <7hbdnp$kn1$1@nnrp1.deja.com>
I am writing a library, and I need to access the calling code's
lexicals. Everything I've read says there is no way to do this. Is there
perhaps another way to get around my problem?
Problem: I am writing extra code to computer generated code.
Specifically , I am using specPerl to generate gui template code that I
then write specific subroutines for. The problem is that specPerl's
interface for writing the code isn't very good. I can specify an
external editor like xemacs to write add-on code, but specPerl wants me
to kill xemacs before generating the code (taking my add-ons into
account), and it becomes annoying to have to shutdown and restart xemacs
everytime I want to make a minor change. So I figured I would put all my
extra code in file called mylib.pl, and just put "require 'mylib.pl'"
where I normally add my own code to the generated code. The problem is
that the generated code creates lexicals, and part of my add-on code
involves those lexicals.
What I wanted to have is a nice, seperate file (library or module) that
I can edit at my convenience that can be independent from generated code
file. However, it seems that as soon as I go into a new file, I leave
scope, and lose track of all lexicals.
Can anyone please help with my problem?
Thanks a lot,
-Julien
--
It may take a litte courage to ask your doctor about Erectile
Dysfunction.
But everything worthwhile usually does.
-Bob Dole
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: 12 May 1999 07:38:26 GMT
From: lehnert@stud.informatik.uni-trier.de (Johannes K. Lehnert)
Subject: Converting a list of hashrefs to a single hashref
Message-Id: <7hbb5i$6k4$1@fu-berlin.de>
Hi,
I had the problem to convert a list of references to hashes to a single
hashref, i.e.
$LoH = [ { "a" => "b" }, { "c" => "d" } ];
should be converted to
$hashref = { "a" => "b", "c" => "d" };
(There are no duplicate keys in the different hashrefs)
My solution was to use map and the 'flattening' of lists:
$hashref = { map { %{$_} } @{$LoH} };
Is this 'the right way' to do it? Is it efficient? I could not find any
hints in the FAQ or in the perlref manpage.
TIA
Johannes K.
--
Johannes K. Lehnert E-Mail: lehnert@stud.informatik.uni-trier.de
WWW: http://www.informatik.uni-trier.de/CIP/lehnert/
"Ich habe nichts gegen Fremde. Einige meiner besten Freunde sind Fremde.
Aber diese Fremden da sind nicht von hier!"
-- Methusalix in: "Das Geschenk des Caesar"
------------------------------
Date: Tue, 11 May 1999 15:47:51 -0400
From: nick <nick@auger.net>
Subject: Finding Total Directory Size in Perl.
Message-Id: <37388967.BB5B4BD5@auger.net>
How do you go about finding the total size of a directory (including all
subdirectories), I have tried the "du" command with the backticks, but
it always times out on my server... Is there another way to do it?
Thanks!
Nick Auger
http://sk8punk.otmi.com -- Skate! Free Button XChange & More!
------------------------------
Date: Wed, 12 May 1999 07:16:26 GMT
From: design@raincloud-studios.com (Charles R. Thompson)
Subject: Re: Finding Total Directory Size in Perl.
Message-Id: <MPG.11a2f6285f47b3dc98969f@news>
[This followup was posted to comp.lang.perl.misc and a copy was sent to
the cited author.]
In article <37388967.BB5B4BD5@auger.net>, nick says...
> How do you go about finding the total size of a directory (including all
> subdirectories), I have tried the "du" command with the backticks, but
> it always times out on my server... Is there another way to do it?
egads. Yes. :) Using File::Find will make this a snap for you. It's
included with the standard distribution, so it should be on your machine.
If this script balks at you about it, you'll have to get it and install
it from CPAN. File find can work wonders on directory trees. I've only
been using it for about a week now and can't figure out how I ever did it
before. :)
dirfind.pl follows....
#!/usr/bin/perl -w
use strict;
use File::Find;
# if browser oriented uncomment
# print "Content-type: text/html\n\n";
my $sizes = 0;
# replace this with your absolute path
my $path = '/drv1/web/sites/web6517e/';
find (sub {$sizes += -s ;}, $path);
print "Total File Sizes for $path = $sizes bytes";
#END
sample output...
Total File Sizes for /drv1/web/sites/web6517e/ = 1152717 bytes
Have Fun.
--
Charles R. Thompson
RainCloud Studios
"quote"
------------------------------
Date: 12 May 1999 09:44:58 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Getting Access to Perl - how?
Message-Id: <37393f8a@newsread3.dircon.co.uk>
Charles R. Thompson <design@raincloud-studios.com> wrote:
> [This followup was posted to comp.lang.perl.misc and a copy was sent to
> the cited author.]
>
> In article <37390487.74B98912@rochester.rr.com>, Orlando C. Fernando
> says...
>> I'm very curious to learn from the people here how you are able to use
>> perl for your cgi scripts.
>
> Perl... not perl. Lesson 1. :)
>
Of course you have to be able to use perl to use Perl ;-}
>
>> On a related note, have you found many ISPs accepting of you using a
>> free script off the web, such as from the big Matt's script archive?
>
> Eh... that's not a nice name around here. Matt isn't commonly referenced
> by the experienced frequent posters in the NG. Ok.. he's not referenced
> at all. :)
>
Well actually yes usually in terms of 'dont go there' type of advice.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
------------------------------
Date: Wed, 12 May 1999 08:30:53 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: HASH AND ARRAY
Message-Id: <37393ba8.1797310@news.skynet.be>
Tad McClellan wrote:
>bababozorg@aol.com wrote:
>: i have a array like this:
>: @array = ("aaa","bbb","ccc");
>: i would like to add each element of this array az a key into a hash.
>
> Use a hash slice.
>
> @hash{@array} = ('') x @array; # keys from @array, values are empty
This is my version:
%hash = map { $_ => '' } @array;
Maybe a bit slower, but easier to read -- and write.
Bart.
------------------------------
Date: Wed, 12 May 1999 06:47:38 GMT
From: feketeroland11@my-dejanews.com
Subject: How can i create DLL from perl script ?
Message-Id: <7hb865$fn3$1@nnrp1.deja.com>
Help me! Help me!
Can i create windows 95/NT .dll from a perl script?
If it's possible, how ???
Thanks for the time,
Roland
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Wed, 12 May 1999 06:32:43 GMT
From: Andreas <andreas73@my-dejanews.com>
Subject: Re: Link -> auto generated page - question
Message-Id: <7hb7ab$etp$1@nnrp1.deja.com>
Ok here4s the uncovered question, how to autogenerate a page from a link
that is related to an image, which will be viewed on the generated page?
Didn4t I say that before?
??
Thanks,
Andreas
In article <7h8rs6$32ts4@news.gomontana.com>,
"Dave Evans" <devans@radius-retail.kom> wrote:
> That's nice. Now, what was your question?
>
> Andreas wrote in message <7h8jhp$eb3$1@nnrp1.deja.com>...
> >Hi,
> >I4d like the visitors at my homepage to click on a link - which then
> >generates a page automatic with an image. Sort of thumbnail, without
the
> >nails, just links. The page that is generated should the contain an
> >image that is related to the link. See what I mean?
> >Thanks,
> >Andreas
> >
>
>
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: 12 May 1999 09:09:04 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Link -> auto generated page - question
Message-Id: <37393720@newsread3.dircon.co.uk>
Andreas <andreas73@my-dejanews.com> wrote:
> Ok here4s the uncovered question, how to autogenerate a page from a link
> that is related to an image, which will be viewed on the generated page?
> Didn4t I say that before?
> ??
You mean :
#!/usr/bin/perl -w
use strict;
use CGI qw(:standard);
print header,
start_html(-title => 'A page with an image on it'),
img( -src => 'someimage.gif'),
end_html;
Or do I misunderstand ?
/J\
--
Jonathan Stowe <jns@gellyfish.com>
------------------------------
Date: Wed, 12 May 1999 00:42:20 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: MS-HTML must die!
Message-Id: <MPG.11a2d09ffa328077989a37@nntp.hpl.hp.com>
[Posted and a courtesy copy sent.]
In article <373864ee@cs.colorado.edu> on 11 May 1999 11:12:14 -0700, Tom
Christiansen <tchrist@mox.perl.com> says...
> Here's the promised perl content.
>
>
> #! /bin/perl
> #
> # De-moron-ise Text from Microsoft Applications
> #
> # by John Walker -- January 1998
> # http://www.fourmilab.ch/
<SNIP of the original code>
I promised to redo the demoroniser (British spelling) in one page. It's
actually somewhat more (88 lines including comments). It would probably
run at least an order of magnitude faster than the original; perhaps
two.
Have the appropriate amount of fun, everyone!
#!/bin/perl -w
use strict;
# De-moron-ise Text from Microsoft Applications
#
# by John Walker -- January 1998
# http://www.fourmilab.ch/
# revised by Larry Rosler -- May 1999
# http://www.hpl.hp.com/personal/Larry_Rosler/
#
# This program is in the public domain.
undef $/;
demoronise(), print while <>;
# demoronise -- Translate moronic Microsoft bit-drool into
# vaguely readable and compatible HTML.
{ my %tr;
sub demoronise {
%tr = (
# Fix dimbulb obscure numeric rendering of & < >.
chr 38 => '&',
chr 60 => '<',
chr 62 => '>',
# Map strategically incompatible non-ISO characters in the
# range 0x82 -- 0x9F into plausible substitutes where
# possible.
"\x82" => ',',
"\x83" => '<em>f</em>',
"\x84" => ',,',
"\x85" => '...',
"\x88" => '^',
"\x89" => '0/00',
"\x8B" => '<',
"\x8C" => 'Oe',
"\x91" => '`',
"\x92" => "'",
"\x93" => '"',
"\x94" => '"',
"\x95" => '*',
"\x96" => '-',
"\x97" => '--',
"\x98" => '<sup>~</sup>',
"\x99" => '<sup>TM</sup>',
"\x9B" => '>',
"\x9C" => 'oe',
) unless keys %tr; # Initialize the hash once only.
# Eliminate idiot MS-DOS carriage returns from line terminator.
s/\s+$/\n/g;
# Supply missing semicolon at end of numeric entity if
# Billy's bozos left it out.
# Map characters in entities.
s/&#(\d+);?/
$tr{chr $1} || ($1 < 0x80 || $1 > 0x9F ? "&#$1;" : chr $1)/ge;
# Now check for any remaining untranslated characters.
my $iline = 1;
$1 eq "\n" ? ++$iline : printf STDERR
"%s: warning -- untranslated character 0x%.2X in line $iline\n",
$ARGV || 'STDIN', ord $1
while /([\x00-\x08\n\x10-\x1F\x80-\x9F])/g;
# Fix unquoted non-alphanumeric characters in table tags.
s@(<T(?:ABLE|D|H)\s.*?WIDTH\s*=\s*)(\d+%)@$1"$2"@gis;
# Correct PowerPoint mis-nesting of tags.
s@(<FONT\s[^>]*>\s*<STRONG>.*?) (</FONT>) (\s*) (</STRONG>)
@$1$4$2$3@gisx;
# Translate bonehead PowerPoint misuse of <UL> to achieve
# paragraph breaks.
s@<(?:P|/UL)>\s*<UL>@<P>@gi;
s@</UL>\s*</P>@@gi;
# Repair PowerPoint depredations in "text-only slides"
s@<P></P>@@gi;
s@ (<TD HEIGHT=100)@ <TR>$1@gi;
s@<LI>(?=<H2>)@@gi;
} }
__END__
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 12 May 1999 02:01:26 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: MS-HTML must die!
Message-Id: <37393556@cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
lr@hpl.hp.com (Larry Rosler) writes:
:I promised to redo the demoroniser (British spelling) in one page. It's
:actually somewhat more (88 lines including comments). It would probably
:run at least an order of magnitude faster than the original; perhaps
:two.
Your code has the Sed Essence, but was not so phrased. Now it is.
Also, I fixed an $ARGV bug you had, and added a multiple break munge.
--tom
#!/bin/perl -0777pw
# De-moron-ise Text from Microsoft Applications
#
# by John Walker -- January 1998
# http://www.fourmilab.ch/
# revised by Larry Rosler -- May 1999
# http://www.hpl.hp.com/personal/Larry_Rosler/
# sedition by Tom Christiansen -- May 1999
#
# This program is in the public domain.
use strict;
my %tr;
# Eliminate idiot MS-DOS carriage returns from line terminator.
s/\s+$/\n/g;
# Supply missing semicolon at end of numeric entity if
# Billy's bozos left it out.
# Map characters in entities.
s/&#(\d+);?/
$tr{chr $1} || ($1 < 0x80 || $1 > 0x9F ? "&#$1;" : chr $1)/ge;
# Now check for any remaining untranslated characters.
my $iline = 1;
$1 eq "\n" ? ++$iline : printf STDERR
"$0: warning -- untranslated character 0x%.2X in line $iline of `%s'\n",
ord $1, ($ARGV eq '-' ? 'standard input' : $ARGV)
while /([\x00-\x08\n\x10-\x1F\x80-\x9F])/g;
# Fix unquoted non-alphanumeric characters in table tags.
s@(<T(?:ABLE|D|H)\s.*?WIDTH\s*=\s*)(\d+%)@$1"$2"@gis;
# Correct PowerPoint mis-nesting of tags.
s@(<FONT\s[^>]*>\s*<STRONG>.*?) (</FONT>) (\s*) (</STRONG>)
@$1$4$2$3@gisx;
# Translate bonehead PowerPoint misuse of <UL> to achieve
# paragraph breaks.
s@<(?:P|/UL)>\s*<UL>@<P>@gi;
s@</UL>\s*</P>@@gi;
# Repair PowerPoint depredations in "text-only slides"
s@<P></P>@@gi;
s@ (<TD HEIGHT=100)@ <TR>$1@gi;
s@<LI>(?=<H2>)@@gi;
# Repair idiotic double breaks
s@<BR>(?:\s*<BR>)+@<P>@gi;
BEGIN {
%tr = (
# Fix dimbulb obscure numeric rendering of & < >.
chr 38 => '&',
chr 60 => '<',
chr 62 => '>',
# Map strategically incompatible non-ISO characters in the
# range 0x82 -- 0x9F into plausible substitutes where
# possible.
"\x82" => ',',
"\x83" => '<em>f</em>',
"\x84" => ',,',
"\x85" => '...',
"\x88" => '^',
"\x89" => '0/00',
"\x8B" => '<',
"\x8C" => 'Oe',
"\x91" => '`',
"\x92" => "'",
"\x93" => '"',
"\x94" => '"',
"\x95" => '*',
"\x96" => '-',
"\x97" => '--',
"\x98" => '<sup>~</sup>',
"\x99" => '<sup>TM</sup>',
"\x9B" => '>',
"\x9C" => 'oe',
);
}
--
Besides, REAL computers have a rename() system call. :-)
--Larry Wall in <7937@jpl-devvax.JPL.NASA.GOV>
------------------------------
Date: 12 May 1999 00:24:42 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Need a little looping help
Message-Id: <m1k8uekax1.fsf@halfdome.holdit.com>
>>>>> "Larry" == Larry Rosler <lr@hpl.hp.com> writes:
Larry> Two tiny strict-ish problems. Otherwise, very cool!
Larry> my @vars = map "\$$_", ('zz01'..'zz05');
Oops. :) Didn't test under "use strict". :)
Larry> $code = qq(for my $_ (1..2) {\n).indent($code).qq(}\n);
Larry> I don't know why the squigglies were backslashed.
GNU Emacs cperl-mode was complaining about mismatched parens.
Yes, I'll probably get a rash of mail from people that think I shouldn't
change my Perl code just to help an editor along, but that's life.
print "Just another Perl hacker,"
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Wed, 12 May 1999 07:45:46 GMT
From: Jeremy Gurney <c4jgurney@my-dejanews.com>
Subject: Re: need a perl/cgi tutorial please
Message-Id: <7hbbja$ja9$1@nnrp1.deja.com>
In article <7h97dt$ssf$1@nnrp1.deja.com>,
tertullian@my-dejanews.com wrote:
>
>
> > http://www.free-ed.net/fr03/lfc/course%20030207_01/index.html
> >
>
> Looks like this has been moved or removed
There seems to be a problem with the way dejanews handles external
links.
If you copy the above link into your browser it should work, just don't
try and get there by clicking on it.
Jeremy Gurney
SAS Programmer | Proteus Molecular Design Ltd.
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Wed, 12 May 1999 08:35:51 GMT
From: tertullian@my-dejanews.com
Subject: Re: need a perl/cgi tutorial please
Message-Id: <7hbeh7$l5u$1@nnrp1.deja.com>
In article <7hbbja$ja9$1@nnrp1.deja.com>,
Jeremy Gurney <c4jgurney@my-dejanews.com> wrote:
> There seems to be a problem with the way dejanews handles external
> links.
>
> If you copy the above link into your browser it should work, just
don't
> try and get there by clicking on it.
>
Your right - thanks, I'll have to watch that!
Dan
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Wed, 12 May 1999 01:09:14 -0700
From: "jb" <j@org>
Subject: need script to debug web server links...
Message-Id: <37393753@news.pointshare.com>
Please let me know if this needs to be posted to another group...
I need some sort of script that I can verify all of the html links on my web
server function correctly. Where would I find such an animal, and what
would you call it?
I have root access to the web server, so there aren't any accessability
problems...
Please respond to both here and to my email: jasonb_diespam_@pointshare.com.
Thanks...
--Jason brooks
------------------------------
Date: Wed, 12 May 1999 16:30:49 +0800
From: Bryan Chen <bryan84@singnet.com.sg>
Subject: Re: PWS and Perl
Message-Id: <37393C38.55E0D79@singnet.com.sg>
You'll have to edit a little of your registry first. If you really want to
find out how to, just let me know.
Bryan
bryan@spug.net
Free Email At Spug.Net
paul_rahe@cissc.canon.com wrote:
> On Tue, 11 May 1999 16:42:15 +0200, "R!k" <rusenet@bigfoot.com> wrote:
>
> >How can I use Perl scripts with Personal Web Server?
> >
> >Rik
> >
> >
>
> 1) Download the Perl interpreter from ActiveState
> (www.activestate.com)
>
> 2) Place your Perl scripts in the <drive>:\inetpub\wwwroot\cgi-bin
> folder
>
> Paul
------------------------------
Date: Wed, 12 May 1999 07:05:54 GMT
From: design@raincloud-studios.com (Charles R. Thompson)
Subject: Re: refreshing frame after CGI
Message-Id: <MPG.11a2f3ab49dcb44f98969e@news>
[This followup was posted to comp.lang.perl.misc and a copy was sent to
the cited author.]
In article <37392085.70EBF5AC@de.ibm.com>, Ralf Edrich says...
> does anybody know and can tell me how to reload/refresh/update a frame
> with a generated html after this
I don't think that's ever been tried! Just jokin.
If you want to redirect the browser to a static page...
http://language.perl.com/newdocs/pod/perlfaq9.html#How_do_I_redirect_to_a
nother_pag
There are a few ways to 'update with a generated html'.. one of the more
common ones would be to place something like this at the end of your
script (assuming everything went ok and you are checking for errors)...
# only use this line if you haven't previously output the header...
print "Content-type: text/html\n\n";
print <<END_OF_HTML;
<html><head><title>my new page</title></head>
<body>
This is my new page
</body>
</html>
END_OF_HTML
As far as refresh / reload.. I dunno. You might ask someone over at
comp.infosystems.www.authoring.cgi if there is a header that can be sent
to do what you ask.
> was generated with CGI ?
was generated with Perl. CGI can't *do* anything.
Good Luck.
--
Charles R. Thompson
RainCloud Studios
"Allright! Wet Biscuits!"
------------------------------
Date: Wed, 12 May 1999 09:25:34 +0100
From: "Daniel Vesma" <daniel.vesma@thewebtree.com>
Subject: Thanks guys, you saved my life :-)
Message-Id: <7hbduk$64b$1@gxsn.com>
Or at least my sanity.
Daniel Vesma
www.thewebtree.com
www.thewebtree.com/daniel-vesma
------------------------------
Date: Wed, 12 May 1999 08:24:43 GMT
From: smnayeem@my-dejanews.com
Subject: Re: Using Perl to fetch web pages, POST method, help?
Message-Id: <7hbdsa$knn$1@nnrp1.deja.com>
In article <MPG.11a2b863903d27bf98969c@news.berkeley.edu>,
buttmunc@uclink4.berkeley.edu (Bryant Fong) wrote:
> In article <yl1zgm6fm8.fsf@windlord.stanford.edu>, rra@stanford.edu
> says...
> > Bryant Fong <buttmunc@uclink4.berkeley.edu> writes:
> >
> > > I need to write a program to fetch a web page to get results from
a
> > > form, but the form method is "POST", not GET (which is easy). Any
idea
> > > how to do it? I would imagine it would involve HTTP commands to
emulate
> > > a web client. I'm looking for either sample code or some
documentation
> > > of how to interface with a web server.
> >
> > Go to CPAN (<URL:http://www.perl.com/CPAN>) and get libwww from
> > modules/by-module/HTTP (and other places).
>
> OK, grabbed, libwww, any sample for doing generally what I want to do?
I
> installed it using ActivePerl PPM (win32) so there isn't much
> documentation =P.
Hey Activeperl has documentation!, just goto start menu and activeperl
and ull know what i mean. :)
smnayeem
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: 12 May 1999 09:35:18 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Using Perl to fetch web pages, POST method, help?
Message-Id: <37393d46@newsread3.dircon.co.uk>
Russ Allbery <rra@stanford.edu> wrote:
> Bryant Fong <buttmunc@uclink4.berkeley.edu> writes:
>
>> OK, grabbed, libwww, any sample for doing generally what I want to do?
>> I installed it using ActivePerl PPM (win32) so there isn't much
>> documentation =P. I downloaded the unix version just for the docs,
>> though, but couldn't find something about grabbing html docs using POST
>> method.
>
> There's an example in the main LWP documentation. See the LWP and lwpcook
> doc files. Doesn't PPM install the docs, at least accessible via perldoc?
>
Yep (well it works for me anyhow ... :)
also of course it can be found at:
<file:///C:/Perl/html/lib/site/LWP/UserAgent.html>
;-}
/J\
--
Jonathan Stowe <jns@gellyfish.com>
------------------------------
Date: Wed, 12 May 1999 06:37:54 GMT
From: leonandrews@my-dejanews.com
Subject: Why no Net::FTP with ActivePerl?
Message-Id: <7hb7k0$f3v$1@nnrp1.deja.com>
Hi,
Can anyone tell me why Net::FTP no longer seems to be available with
ActivePerl using PPM? Are there any issues which may have caused it to
be removed from the Net family of modules?
At the moment I am forced to shell out to windows to use their ftp
client from my scripts - not the best scenario!
many thanks,
Leon.
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: 12 Dec 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 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 5636
**************************************