[9176] in Perl-Users-Digest
Perl-Users Digest, Issue: 2794 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 3 03:07:52 1998
Date: Wed, 3 Jun 98 00:00:44 -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, 3 Jun 1998 Volume: 8 Number: 2794
Today's topics:
Re: Best tool? (Michael J Gebis)
Can I email with attachements <gdoucet@ait.acl.ca>
CGI/Perl Department Head rishi_bhat@hotmail.com
Re: Control characters (Jason Oakley)
Exec a program... <straderb@mindspring.net>
Re: HELP ME PLEASE! suave@colba.net
Re: HOWTO: GDBM and passwd files... suave@colba.net
Re: map in void context regarded as evil - suggestion <tchrist@mox.perl.com>
Re: map in void context regarded as evil - suggestion (Damian Conway)
Re: Need some helps from Perl experts (Michael Armstrong)
Re: network and system programming using perl (Jason Oakley)
Re: Perl Scripts (Jason Oakley)
Re: Perl Scripts suave@colba.net
Re: please help!! (Jason Oakley)
Re: Sendmail from CGI bug (Randy Kobes)
Re: Sendmail from CGI bug (Martien Verbruggen)
Re: Special Variable (again) (Sameer Anand Siruguri)
Re: String to hash utility anyone? <ewy@iname.com>
Re: String to Hash utilty anyone? <ewy@iname.com>
Submitting http request and getting/parsing resulting p sylviamoestl@my-dejanews.com
user authentication <neilf@echelon.ca>
User-space Driver <feisele@ameritech.net>
Why aren't my objects destructors being called? <mgregory@asc.sps.mot.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 3 Jun 1998 02:20:41 GMT
From: gebis@albrecht.ecn.purdue.edu (Michael J Gebis)
Subject: Re: Best tool?
Message-Id: <6l2btp$fah@mozo.cc.purdue.edu>
arch@abts.net (Shaun Sides) writes:
}Original message by: Abigail <abigail@fnx.com>
}Date: 1 Jun 1998 15:49:22 GMT
}Subject: Re: Best tool?
}> ++ Probably a good web server and a good web browser. I'd use apache and
}> ++ navagator. ^^^^^^^^^^^^^^^^
}> ^^^^^^^^^
}> Why don't you practise what you preach?
}What's your choice in browsers?
Also, what is your favorite:
Religion, OS, editor, hair color, car manufacturer, brand of
power tool, band, and beer?
I couldn't figure out how to crosspost to soc.culture.religion.*,
comp.os.*, gnu.*, soc.*, rec.autos.*, rec.*, alt.music.*, and
alt.beer. Can anybody help? I think we could make some real progress
on these issues if we could only get input.
--
Mike Gebis gebis@ecn.purdue.edu mgebis@eternal.net
------------------------------
Date: Wed, 03 Jun 1998 03:53:29 GMT
From: Guy Doucet <gdoucet@ait.acl.ca>
Subject: Can I email with attachements
Message-Id: <3574C951.B9BDAF48@ait.acl.ca>
I am running Perl scripts on my Novell Web Server. I am just starting to
use a JMerril's SENDSMTP.PL script to send e-mails. It seems to work,
but I was wondering if there is a way to include an attachment.
Sorry if I am posting in the wrong group, but if anyone here is doing
this I would appreciate your help. If I should search on the RFC822
specifications, does anyone know where I can get them.
Sincerely,
Guy Doucet
------------------------------
Date: Wed, 03 Jun 1998 01:56:43 GMT
From: rishi_bhat@hotmail.com
Subject: CGI/Perl Department Head
Message-Id: <6l2agr$ign$1@nnrp1.dejanews.com>
Hello,
I am the webmaster of a new site that was created to help webmasters
(both novice and expert) to build websites. Please feel free to look at the
layout:
http://www.webresource.net/
I am currently looking for someone to head the CGI section of the website.
Your responsibilities will include writing two to three (more if possible)
articles (on the topic of your choice) per month. The ideal candidate will
have excellent writing skills and at least one year of solid
CGI/Perl programming experience. Details such as article length, topics, etc.
will be discussed in further detail in the "interviewing" process.
Compensation :
To begin with, we will implement a pay per article system. For each article
you write, you will be paid $35 US dollars. Once we get the site launched,
and ad revenue begins pouring in :-), we will both sign a contract that
guarantees you your equal share of all ad and consulting revenues received by
the site. This will be discussed in further detail in the interviewing
process.
If you are interested, please send your resume (in any format you want) and a
few urls of your work to :
rishi_bhat@hotmail.com
Please make sure that you will have the time to write two to three articles
per month before you apply. Thank you for your time.
----
Rishi Bhattacharya
Electrical Engineer
NASA/Lockheed Martin
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Wed, 03 Jun 1998 03:03:06 GMT
From: waulok@trust-me.com.SPAMLESS (Jason Oakley)
Subject: Re: Control characters
Message-Id: <3574bc63.16030308@news.oznetcom.com.au>
On Sun, 31 May 1998 20:27:13 -0500, REUBEN LOGSDON <rlogsdon@io.com>
wrote:
>\cM is some kind of end-of-line marker. i think it is from windows
>machines. If you ftp a perl script from win -> unix in binary mode there
>will be \cM's at the end of every line (they look like ^M in vi). They
>break the code. Also if you submit a form with a textarea field and you
>have line breaks in your input, they show up as \cM\n when the form is
>processed. The code below looks like it is turning that form data line
>breaks into html line breaks. Matt Wright's guestbook.pl does this
>
>Regards,
>Reuben Logsdon
>
>
>On Fri, 29 May 1998, Liz Castro wrote:
>
>> While deciphering someone else's code, I've come across the following:
>>
>> $val2 =~ s/\cM\n/<BR>/g;
>>
>> I found a quick reference to \c in the Camel book; it says to use if for
>> control characters.
>>
>> So what does \cM mean?
>>
>> TIA,
>> Liz
>>
>>
>
Yeh.. it's changing all of the window's End Of Line markers into <BR>
statements for HTML.
Each line of a program saved under windows has ^M\n at the end of each
line. Which is the same as if you pressed the CTRL key and the M key
on your keyboard.
Extra note: Never edit perl programs in Windows unless you remove all
the ^Ms before running it or you will get an error.
------------
Jason Oakley - WebMaster & System Administrator
mailto:tech@comcen.com.au http://www.comcen.com.au
COM-CEN Internet Service Provider Pty Ltd
Sydney, Melbourne, Gosford (soon Penrith)
* Ph: 1800 555 001 Ph: 02 9436 1889 *
* Ph: 03 9419 3011 Fx: 02 9906 4620 *
* 6/87 Reserve Road ARTARMON 2064 *
The Net is the future, COMCEN is the key!
------------------------------
Date: Wed, 03 Jun 1998 02:20:59 -0400
From: Billy Strader <straderb@mindspring.net>
Subject: Exec a program...
Message-Id: <3574EB4B.DBE67BEF@mindspring.net>
OK it is me again... no more leap year problem got it working thanks to
you all.
My problem now is I wanna excute fortune and then take the print out and
put it at the end of a web page it prints out. How do I do that I know
to execute the program and print it at the normal unix prompt is
exec('/usr/games/./fortune');
But I cant seem to get it to work with a web page. Can anyone help???
All help is greatly appriacted.
Sincerley,
Billy Strader
------------------------------
Date: Wed, 03 Jun 1998 02:21:42 -0400
From: suave@colba.net
Subject: Re: HELP ME PLEASE!
Message-Id: <3574EB76.877763DC@colba.net>
Specify which frame you want the output to go to.
Suppose you've got a frame on the right side called _bob, and a frame on
the left side called _harry
when you reference a document in the left frame, and want the output in
the right frame, you must specify a TARGET.
example (click on edit and view source if you are using a html capable
newsreader, or you won't be able to read the following code):
<a href="./somefile.htm" target="_harry">Harry!</a>
Hope that helps
------------------------------
Date: Wed, 03 Jun 1998 01:25:05 -0400
From: suave@colba.net
Subject: Re: HOWTO: GDBM and passwd files...
Message-Id: <3574DE31.5FAC8011@colba.net>
Thanks for the help folks, turns out that there was a file mix-up, and
it was trying to access the wrong file. I am still experiencing somewhat
of a challenge, and maybe one of you could help me figure it out. This
may seen really simple, but I'm still a beginner here so humour me :)
I'm making a several tools to make account administration easier to
perform certain tasks like checking to see if a password is correct,
changing a password, 'deadbeating' a password entry. To do this, I'm
making some CGI applications which will lookup the entries in the passwd
file and compare them to the input from an html form. Most of you will
be chuckling at my stupidity by now, for not being able to figure out
such easy things, but I can't for the life of me figure out how to use
the crypt function. Here's basically what I want to do:
1) password tester
- get the input from the html form-->username, password (no problems so
far)
- encrypt the password using the same salt as the one contained for that
username in the password file (here's where the trouble begins, I just
can't seem to grasp how to get the salt from the password file entry for
that username and apply it to encrypting the password supplied in the
form)
- open the passwd file (This I can handle _I think_, by GDBM_File and
looking up a key)
- comparing both values and returning success (the user inputted the
correct password) or failure (wrong password)
2) password changer
- getting the form input from the web page (username, newpassword, not a
problem)
- encrypting the new password (Again, that damned salt. I really don't
know what to do with it.)
- opening up and writing to the password files (shouldn't be a problem)
- returning a web page with success or failure (no problems here)
Kudos to Tom Christiansen, Randal Schwartz for their fine Llama and
Camel books, it's helped me out alot. (And of course Larry Wall for
inventing such a nice language)
If anyone wants the final version of the programs I'll be putting
together, drop me an e-mail and I can send you a copy
Mark Steele
Technical Support Supervisor
ColbaNet Internet Inc.
ps: sorry about being so verbose, I just like to explain things in
detail
------------------------------
Date: 3 Jun 1998 03:21:51 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: map in void context regarded as evil - suggestion
Message-Id: <6l2fgf$37u$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
ced@bcstec.ca.boeing.com (Charles DeRykus) writes:
:instead of the tautological looking:
: @items = map { s/foo/bar/ } @items;
Why are you replacing the items with the result of whether they had a
foo changed to a bar?
And you wonder why I don't care for this kind of thing?
--tom
--
"If you only have a nail, you tend to see every hammer as a problem."
--Larry Wall
------------------------------
Date: 3 Jun 1998 03:58:02 GMT
From: damian@cs.monash.edu.au (Damian Conway)
Subject: Re: map in void context regarded as evil - suggestion
Message-Id: <6l2hka$l1m$1@towncrier.cc.monash.edu.au>
ced@bcstec.ca.boeing.com (Charles DeRykus) writes:
>Maybe, there's some real design ambiguities that could occur
>but I've always wondered why map (grep and sort too for that
>matter) couldn't have a slight semantic frill:
> @items = map { s/foo/bar/ }; # elided RHS list defaults to LHS
>or, similarly:
> @items = sort { $a <=> $b };
> @items = grep(/condition/);
Surely a generalization of the "binding" operator (=~) would be
a better choice for such constructs:
@items =~ map { s/foo/bar/ };
@items =~ sort { $a <=> $b };
@items =~ grep { /condition/ };
Damian
PS: ;-)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
name: Damian Conway addr: School of Computer Science
email: damian@csse.monash.edu.au and Software Engineering
web: http://www.cs.monash.edu.au/~damian Monash University
fax: +61-3-9905-5146 Clayton 3168, AUSTRALIA
------------------------------
Date: Wed, 03 Jun 1998 02:48:45 GMT
From: michaela@phosphor.com (Michael Armstrong)
Subject: Re: Need some helps from Perl experts
Message-Id: <3575b961.16214815@news.visi.com>
On Mon, 01 Jun 1998 20:55:05 +0800, Seman Bajau <wat@forfree.at> spake
thusly:
[snip]
(A better description of the problem than "not working" would more
helpful in the future.)
>server typed. I used the scripts for educational purposed. My web
>directory is http://www.fit.unimas.my:8080/~a9430170/Calendar/
>My path is /home/student/UGRAD/a9430170/WWW/Calendar/
>The cgi-bin directory is /home/sandbox/U_Hyper/WWW/cgi-bin/
Is there some special reason that the CGIs for the calendar scripts
aren't in your cgi-bin directory (or a subdirectory therein)? Many Web
servers won't execute CGI scripts outside of certain designated
directories, either a server wide cgi-bin or a user's individual
cgi-bin directory.
Once you move them to a proper cgi-bin directory, you'll likely need
to edit the scripts so the directory settings in calendar.setup point
the right place.
---
Michael Armstrong
michaela@phosphor.com http://www.phosphor.com/
Full service Web design and Internet consulting
------------------------------
Date: Wed, 03 Jun 1998 02:29:27 GMT
From: waulok@trust-me.com.SPAMLESS (Jason Oakley)
Subject: Re: network and system programming using perl
Message-Id: <3574b501.14139804@news.oznetcom.com.au>
On Tue, 02 Jun 1998 11:41:53 +0900, Jackie Chong
<jackiech@ktweb.kotel.co.kr> wrote:
>Hi, there
>
>I am about to launch into network and system programming world.
>Even though I have a programming experience, I have not picked the most
>comfortable language for me. Among Java, perl and perhaps other
>languages, which one is most suitable for network and system
>programming. Personally perl that I know is a simple and realatively
>easy one than c. I don't know about Java but I am afraid it would take
>more time to be familiar with it. what do you ,who are familiar with all
>three, think?
>Any feedback will be so helpful.
>
>Thanks
>
I'd say C.
------------
Jason Oakley - WebMaster & System Administrator
mailto:tech@comcen.com.au http://www.comcen.com.au
COM-CEN Internet Service Provider Pty Ltd
Sydney, Melbourne, Gosford (soon Penrith)
* Ph: 1800 555 001 Ph: 02 9436 1889 *
* Ph: 03 9419 3011 Fx: 02 9906 4620 *
* 6/87 Reserve Road ARTARMON 2064 *
The Net is the future, COMCEN is the key!
------------------------------
Date: Wed, 03 Jun 1998 02:24:41 GMT
From: waulok@trust-me.com.SPAMLESS (Jason Oakley)
Subject: Re: Perl Scripts
Message-Id: <3574b289.13508299@news.oznetcom.com.au>
On Mon, 01 Jun 1998 13:37:33 +0100, Dan : Refresh Net
<daniel.fox@virgin.net> wrote:
>
>
>Steven Roka wrote:
>
>> I am new at this and would like to find a perl scripts library (ie i don't
>> understand the technical stuff), or even better a script that will email me
>> information filled in a form on a web page.
>> Steve
>
> YEAH! I need to know exactly the same stuff.
>
>Anybody know some good PERL resources on the web
>
http://worldwidemart.com/scripts
http://www.city.at/selena/Scripts/
http://www.scriptsearch.com/
------------
Jason Oakley - WebMaster & System Administrator
mailto:tech@comcen.com.au http://www.comcen.com.au
COM-CEN Internet Service Provider Pty Ltd
Sydney, Melbourne, Gosford (soon Penrith)
* Ph: 1800 555 001 Ph: 02 9436 1889 *
* Ph: 03 9419 3011 Fx: 02 9906 4620 *
* 6/87 Reserve Road ARTARMON 2064 *
The Net is the future, COMCEN is the key!
------------------------------
Date: Wed, 03 Jun 1998 01:28:51 -0400
From: suave@colba.net
Subject: Re: Perl Scripts
Message-Id: <3574DF13.1CB683A6@colba.net>
Well if you want a quick and painless form processor, try FormMail which
can be found at www.worldwidemart.com/scripts
Otherwise, if you need something that's more custom made, drop me an
e-mail with what you need and maybe I can help you out
Mark Steele
Technical Support Supervisor
ColbaNet InterNet Inc.
suave@colba.net
------------------------------
Date: Wed, 03 Jun 1998 05:12:04 GMT
From: waulok@trust-me.com.SPAMLESS (Jason Oakley)
Subject: Re: please help!!
Message-Id: <3574dad7.23828021@news.oznetcom.com.au>
On Mon, 01 Jun 1998 08:49:50 -0600, Melissa Ferrara
<melissa@celsvr.stortek.com> wrote:
>Hey all. I have a website, and I've created a perl script to run with
>my page. My question is, how do I put my perl script in my
>"usr/local/perl" directory? My UNIX server does have this directory, so
>could someone tell me what command(s) I must enter to put it there.
>Please respond to my email. Thanks.
You don't.. you put your SCRIPT in the CGI-BIN directory. Eg. Our
runs from /var/www/cgi-bin
Interesting concept that one can create a script without having used
Perl before... :)
------------
Jason Oakley - WebMaster & System Administrator
mailto:tech@comcen.com.au http://www.comcen.com.au
COM-CEN Internet Service Provider Pty Ltd
Sydney, Melbourne, Gosford (soon Penrith)
* Ph: 1800 555 001 Ph: 02 9436 1889 *
* Ph: 03 9419 3011 Fx: 02 9906 4620 *
* 6/87 Reserve Road ARTARMON 2064 *
The Net is the future, COMCEN is the key!
------------------------------
Date: 3 Jun 1998 02:21:28 GMT
From: randy@theory.uwinnipeg.ca (Randy Kobes)
Subject: Re: Sendmail from CGI bug
Message-Id: <slrn6n9d6o.pm2.randy@theory.uwinnipeg.ca>
On Wed, 3 Jun 1998 09:51:25 +1000, Noel Sampol <noels@ozinet.zip.com.au> wrote:
>Hi...
>
>I have a perl CGI script that sends mail thru sendmail - it seems to work
>with most e-mails but when I use my alias e-mail it processes it but doesn't
>seem to send the mail to the alias address. I have the follwoing code
>fragment:
>
>$mailprog = "/usr/bin/sendmail";
>$owner_name = "Noel Sampol";
>$owner_email = 'noels@zip.com.au'; # this is my real address
>$email = 'noels@ozinet.zip.com.au'; # this is from HTML form and it's an
># alias address
># Send confirmation e-mail to owner
>open (MAIL, "| $mailprog -n -oi -t");
[ snip ]
Hi,
I tried the code, using two valid email addresses for $owner_email
and $email, and got the messages sent to both addresses. But,
looking at my man page for sendmail, doesn't the '-n' switch mean
to not do aliasing? Maybe removing the -n would work.
Best regards,
Randy Kobes
Physics Department Phone: (204) 786-9399
University of Winnipeg Fax: (204) 774-4134
Winnipeg, Manitoba R3B 2E9 e-mail: randy@theory.uwinnipeg.ca
Canada http://theory.uwinnipeg.ca/
------------------------------
Date: 3 Jun 1998 02:57:44 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Sendmail from CGI bug
Message-Id: <6l2e38$95m$1@comdyn.comdyn.com.au>
In article <6l235o$h2$1@the-fly.zip.com.au>,
"Noel Sampol" <noels@ozinet.zip.com.au> writes:
> Hi...
>
> I have a perl CGI script that sends mail thru sendmail - it seems to work
> with most e-mails but when I use my alias e-mail it processes it but doesn't
> seem to send the mail to the alias address. I have the follwoing code
This question has absolutely nothing to do with perl. It's a question
about sendmail. Please, in the future, post to an apporpriate group.
[snip]
> $mailprog = "/usr/bin/sendmail";
[snip]
> open (MAIL, "| $mailprog -n -oi -t");
What does the man page on your system have to say about the -n flag to
sendmail?
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | I'm just very selective about what I
Commercial Dynamics Pty. Ltd. | accept as reality - Calvin
NSW, Australia |
------------------------------
Date: Wed, 3 Jun 1998 03:27:01 GMT
From: sam@everest.cse.iitb.ernet.in (Sameer Anand Siruguri)
Subject: Re: Special Variable (again)
Message-Id: <slrn6n9gqo.i9q.sam@everest.cse.iitb.ernet.in>
On Thu, 28 May 1998 19:36:47 GMT, bthak@bascom.com wrote:
>Okay let me try to clarify what i need. (Hope this is clearer)
>
>foreach $index ($rangeStart..$rangeFin) {
> $i = $index;
> if ($ip1[$i] =~ /^\d+$/ && $ip2[$i] =~ /^\d+$/ && $ip3[$i] =~ /^\d+$/ &&
> $ip4[$i] =~ /^\d+$/) {
> $count2++;
[snip]
>
>Okay Now my question is which number failed .. if i had something like
>following
The return value of each =~ in a list context, i.e. @ret1=($ip1[$i]=~/^\d+$/),
will contain the substrings matched by the regexp. You will need to compare
these returned substrings with the value of the IP field to check if you have
got what you wanted.
Hope that helps. Sam.
--
Sameer Anand Siruguri, Undergraduate, Computer Science and Engineering,
Indian Institute of Technology, Mumbai, India.
sam@cse.iitb.ernet.in www.cse.iitb.ernet.in/~sam
------------------------------
Date: Wed, 3 Jun 1998 00:19:54 -0400
From: "eric" <ewy@iname.com>
Subject: Re: String to hash utility anyone?
Message-Id: <3574d0d5.0@news.one.net>
John,
Thanks for your input. I will give it a try. brain d foy gave me a
suggestion to. I will try them both out.
Eric
John Porter wrote in message <35741BAF.7B5B@min.net>...
>Eric Youngquist wrote:
>>
>> "dir1/sdir1/sdir11/file11.txt"
>> "dir1/sdir2/file2.txt"
>> "dir1/sdir3/sdir33/sdir333/file333.txt"
>>
>> and I would like to place them in a hash based on the delimiter "/":
>>
>> $hash{dir1}{sdir1}{sdir11}=file11.txt
>> $hash{dir1}{sdir2}=file11.txt
>> $hash{dir1}{sdir3}{sdir33}{sdir333}=file333.txt
>
>That's interesting.
>
>sub add_to_hash {
> my( $hashref, $filename ) = @_;
> my @p = split( /\//, $filename );
> while ( @p ) {
> $hashref = ( $hashref->{shift(@p)} = {} );
> }
>}
>
>my %hash;
>for ( @filenames ) {
> add_to_hash( \%hash, $_ );
>}
>
>hth,
>John Porter
------------------------------
Date: Wed, 3 Jun 1998 00:13:24 -0400
From: "eric" <ewy@iname.com>
Subject: Re: String to Hash utilty anyone?
Message-Id: <3574cf52.0@news.one.net>
Brian,
Thanks for the help. It was exactly what I was looking for!
brian d foy wrote in message ...
>In article <6kv87b$gr7$1@malgudi.oar.net>, "Eric Youngquist"
<ewy@iti-oh.com> posted:
>
>>Basically, I have the following strings
>>
>> "dir1/sdir1/sdir11/file11.txt"
>> "dir1/sdir2/file2.txt"
>
>>and I would like to place them in a hash based on the delimiter "/":
>>
>> $hash{dir1}{sdir1}{sdir11}=file11.txt
>> $hash{dir1}{sdir2}=file11.txt
>
>here's some pseudo-code:
>
> split the original string appropriately.
> save the last item of the resulting list for the final value
> use the other keys to build up a string which you will eval
>
>here's some real code
>
> #!/usr/bin/perl
> use vars qw(%hash $string $value);
>
> my @array = split m|/|, "you/must/wear/socks";
>
> $value = pop @array;
>
> $string = '$hash';
>
> for ( @array )
> {
> $string .= "{$_}";
> }
>
> eval("$string = q/$value/");
>
> print "$hash{you}{must}{wear}\n";
>
> __END__
>
>--
>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 T-shirts! <URL:http://www.pm.org/tshirts.html>
------------------------------
Date: Wed, 03 Jun 1998 04:24:24 GMT
From: sylviamoestl@my-dejanews.com
Subject: Submitting http request and getting/parsing resulting page?
Message-Id: <6l2j5o$uq1$1@nnrp1.dejanews.com>
Hello,
I'd like to be able to do the following programatically in Perl:
Take numerous URL strings (for example,
http://www.xxx.com/test.spl?parameter=ABC)
Send them out over the internet
Return the page that the URL returns, be able to parse it out, etc.
I'd really appreciate it if somebody has any pointers or code on this one. I
know I could to it in Access/VB with numerous ActiveX controls, but I'd
really love to be able to do this with Perl. Seems like something Perl would
be able to do quite handily, but I haven't found anything yet.
Regards,
Sylvia
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Wed, 3 Jun 1998 10:08:10 -0400
From: "Neil Frenette" <neilf@echelon.ca>
Subject: user authentication
Message-Id: <6l2b8d$jnk$1@nntp2.uunet.ca>
I have a script which is in a directory that is .htaccess protected. This is
a massive script which either displays a document to a user or allows the
user to edit the document. When the user access the script they are first
prompted for their username and password, then they can view the document.
On this page their is a like (to the same script different argument passed
it) which allows them to edit the script. I would like, at this point to
prompt the user for their username and password again (different password
file than before). all members of the project team (htpassword.all) should
be able to read the documents. But only the members of the
(htpassword.developers ) can edit the document.
the .htaccess takes care of the read-only access.
Is there a way to force the user (using a dialog box like the .htaccess one)
to enter their
username and password againg ????
Neil Frenette
Magellan Web Administrator
Nortel
nfrenett@nortel.ca
------------------------------
Date: Tue, 02 Jun 1998 19:13:03 -0400
From: "Fredrick P. Eisele Sr." <feisele@ameritech.net>
Subject: User-space Driver
Message-Id: <357486FF.6C3DC5ED@ameritech.net>
Back in December '94 Michael K. Johnson wrote an article
stating,
"Since perl can use the mmap() call, it is possible to write
device drivers that access /dev/port and /dev/mem as perl
scripts."
in Linux Journal.
Does anyone have any such experience writing user-space
drivers
using perl (or any scripting language for that matter).
------------------------------
Date: 03 Jun 1998 11:35:32 +0930
From: Martin Gregory <mgregory@asc.sps.mot.com>
Subject: Why aren't my objects destructors being called?
Message-Id: <r84sy3qlxv.fsf@asc.sps.mot.com>
perlobj says
Destructors
When the last reference to an object goes away, the object
is automatically destroyed.
How can I find out why this is not happening?
I have code like this
sub do_something
{
my $thing = new Thingy;
$thing->stuff();
}
and the destructor for $thing ($Thingy::DESTROY) never gets called,
and my program (that makes repeated calls to do_something) consumes
memory.
I made a simple test case, and the destructor _does_ get called, so
obviously something about ->stuff() is making $thing more permanent.
The only way I can see that this can happen is if ->stuff() creates a
reference to %{$thing}. Is this true? The author of Thingy swears
that Thingy does not do that.
If I explicitly undef all the keys of %{$thing} before exiting
do_something, the memory leak appears to be fixed (or at least, is
drastically reduced).
Thanks for any insight or debugging tricks. The actual code of
do_something is appended, in case it shows something up...
Martin.
sub read_rtmx_data
{
my ($mif_doc, $table_r) = @_;
# Open MIF Source File.
my ($MIF_file) = new FileHandle "< $mif_doc";
defined($MIF_file) or die "Can't open $mif_doc : $!\n";
# Set up parser
my ($parser) = new MifParse;
# Here is where the RTMX info gets stored.
$parser->setUserData('RTMXTable', $table_r);
# A flag to indicate some problem with the source document traceability info.
$parser->setUserData('TraceError', 0);
# We extract document name & version from variables
$parser->setHandler('VariableFormat', \&set_document_id);
# Use the text flow notifier to start para handling
# (because we don't want to get called for the table paragraphs
# till we hit the table instantiation in the text flow)
$parser->setNotifier('TextFlow', \&initialise_tracing);
# Tell initialise_tracing what para handler to use
$parser->setUserData('ParaHandler', \&get_traceability_info);
# Parse! (Don't care about returned document information)
print STDERR "Commencing parsing...\n" if $debug;
$parser->parseFile($MIF_file);
my $errors = $parser->getUserData('TraceError');
# WHY DO I HAVE TO DO THIS TO FREE THE MEMORY?
my $key;
foreach $key (keys %{$parser}) {
undef $$parser{$key};
}
return($errors);
}
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.
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 2794
**************************************