[8190] in Perl-Users-Digest
Perl-Users Digest, Issue: 1808 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Feb 4 14:13:06 1998
Date: Wed, 4 Feb 98 11:00:40 -0800
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, 4 Feb 1998 Volume: 8 Number: 1808
Today's topics:
Re: 'require' dir same as app's? <cberry@cinenet.net>
>> CGI QUESTIONS? READ THIS <<< (Chip Salzenberg)
Re: ?redirection by several menu choices & one form? (Chip Salzenberg)
Re: Advice needed. <rootbeer@teleport.com>
Re: Anyone have perl5.004_03 working with AIX-4.2.1 ? (Jeffrey R. Drumm)
Re: can variables be generated on the fly (Earl Hood)
Re: Debuggin w/o shell (Chip Salzenberg)
Re: Don't use signal handlers (was Re: Child processes) (Chip Salzenberg)
Re: Filtering Problem (Chip Salzenberg)
Re: Generic Config-file maintenance (Andy Wardley)
Re: Global variable names <escrubb@att.net>
Re: Help! 255-char URL limit passing form values to cgi (Chip Salzenberg)
Re: HELP! (Chip Salzenberg)
how do i execute a .pl program from within a .pl progra <bmcmullan@channell.com>
Re: how do i execute a .pl program from within a .pl pr (Chip Salzenberg)
Re: I am female, blonde and stupid! <jdporter@min.net>
Re: I am female, blonde and stupid! scott@softbase.com
Re: I am female, blonde and stupid! <dgwilson@gte.net>
Re: killing a child process after a timeout (Chip Salzenberg)
newbie question <james.@jwtech.net/>
Re: newbie question (Chip Salzenberg)
Re: NPH question (Chip Salzenberg)
Re: Optimizing dependency generation (Jack Ostroff)
Re: Passing Javascript variables to Perl CGI? scott@softbase.com
Re: perl and file system (Chip Salzenberg)
Re: Quickie: regexp for valid e-mail addresses (Abigail)
Re: Quickie: regexp for valid e-mail addresses (Abigail)
Re: Quickie: regexp for valid e-mail addresses <dfetter@shell4.ba.best.com>
Re: recursive regex? (Ilya Zakharevich)
Sending files to STDOUT <jonah@gsoft.lindesign.se>
Simple example of using Cryptix(Perl) for RSA umsee@cc.umanitoba.ca
Re: solution for multiline comments??? (Mark-Jason Dominus)
Web Client Programming Question (Victor Pronk)
Re: Who can give me a Pl. cgi example on NT to change L (Chip Salzenberg)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 4 Feb 1998 09:28:04 -0800
From: Craig Berry <cberry@cinenet.net>
To: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: 'require' dir same as app's?
Message-Id: <Pine.GSO.3.95.980204092554.13027B-100000@hollywood.cinenet.net>
On Wed, 4 Feb 1998, Tom Christiansen wrote:
> In comp.lang.perl.misc, cberry@cinenet.net (Craig Berry) writes:
> :Now, the problem: When run from the directory containing the two source
> :files mentioned above, all is well. However, when run from any other
> :dir, the 'require' can't find 'bar.pl'. Now, obviously, that's because
> :the dir where my app lives isn't in @INC, nor should it be in general.
> :However, I'd love to convey to Perl the idea 'look in the same dir you
> :got the current file from' without having to fall back on 'require
> :/path/to/bar.pl', which I'm doing now as a stopgap.
> :
> :So, what should I do?
>
> You should read the FAQ, which covers this. You'll be happy
> you did.
As a matter of fact, I did, yesterday, for about half an hour, without
success in resolving this issue. I (like good netizens everywhere)
routinely do so before pestering Usenet readers. So, clearly, I missed
something. Can you give me a pointer on where to look within the (rather
volumninous) FAQ, please?
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: Wed, 04 Feb 1998 18:08:18 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: >> CGI QUESTIONS? READ THIS <<<
Message-Id: <6baau4$ujr$1@cyprus.atlantic.net>
CGI is not the subject of this group.
You want comp.infosystems.www.authoring.cgi, down the hall to the left.
--
Chip Salzenberg - a.k.a. - <chip@pobox.com>
"Nice shooting, Zanthar!" "Thanks, Denise." // MST3K
-> Ask me about Perl training and consulting <-
Like Perl? Want to help out? The Perl Institute: www.perl.org
------------------------------
Date: Wed, 04 Feb 1998 17:38:58 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: ?redirection by several menu choices & one form?
Message-Id: <6ba96q$ud8$1@cyprus.atlantic.net>
According to pmthomas <pmthomas@concentric.net>:
>I hate having to click a million times to ultimately reach one page. I
... really belong in comp.infosystems.www.authoring.cgi.
--
Chip Salzenberg - a.k.a. - <chip@pobox.com>
"Nice shooting, Zanthar!" "Thanks, Denise." // MST3K
-> Ask me about Perl training and consulting <-
Like Perl? Want to help out? The Perl Institute: www.perl.org
------------------------------
Date: Wed, 4 Feb 1998 09:26:41 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Sergio Loscialo <nospam_sloscialo@chubb.com_nospam>
Subject: Re: Advice needed.
Message-Id: <Pine.GSO.3.96.980204092615.6372G-100000@user1.teleport.com>
On Wed, 4 Feb 1998, Sergio Loscialo wrote:
> Subject: Advice needed.
Please check out this helpful information on choosing good subject
lines. It will be a big help to you in making it more likely that your
requests will be answered.
http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post
Thanks.
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 04 Feb 1998 17:58:44 GMT
From: drummj@mail.mmc.org (Jeffrey R. Drumm)
Subject: Re: Anyone have perl5.004_03 working with AIX-4.2.1 ?
Message-Id: <34d8a9f5.1122729699@news.mmc.org>
On 4 Feb 1998 15:51:28 GMT, mark@misty.com (Mark G. Thomas) wrote:
>Has anyone successfully compiled perl5.004_03 or perl5.004_04
>under AIX-4.2.1, such that all the tests pass?
>
>I'm getting really frustrated here.
>
>perl5.004_03:
>Failed Test Status Wstat Total Fail Failed List of failed
>------------------------------------------------------------------------------
>lib/dirhand.t 5 3 60.00% 2-4
>lib/filefind.t 1 1 100.00% 1
>lib/findbin.t 1 1 100.00% 1
>op/readdir.t 3 2 66.67% 2-3
>Failed 4/152 test scripts, 97.37% okay. 7/4567 subtests failed, 99.85% okay.
I needed Perl before I needed a C compiler (since 4.2+ doesn't come with one)
so I downloaded the precompiled binaries in a nice neat smit-installable bff
from http://www-frec.bull.com.
of course, I discovered that there wasn't much I could do to extend my
installation without C, so I bought/installed it. Haven't had any problems
installing modules since, but I also haven't tried to build Perl.
If you just want to get core Perl installed and running, though, get thee to
Bull.
--
Jeffrey R. Drumm, Systems Integration Specialist
Maine Medical Center - Medical Information Systems Group
drummj@mail.mmc.org
"Broken? Hell no! Uniquely implemented!" - me
------------------------------
Date: 4 Feb 1998 16:45:56 GMT
From: ehood@medusa.acs.uci.edu (Earl Hood)
Subject: Re: can variables be generated on the fly
Message-Id: <6ba604$8lv@news.service.uci.edu>
In article <6b817p$ruh$1@cyprus.atlantic.net>,
Chip Salzenberg <chip@pobox.com> wrote:
>According to ehood@medusa.acs.uci.edu (Earl Hood):
>>Maybe for variables, but can be handy for subroutines. For many of the
>>cases where references are needed, soft references are not needed.
>>However, they do have there uses, especially when obtaining a reference
>>to an object can be quite troublesome if you restict your self to hard
>>references only.
>
>And obtaining hard references is difficult exactly when?
One can always use eval to avoid the specifc use of soft references
all together, but it can kludge up the code.
I use soft references in a program where users can modify the behavior
of the program by specifying there own functions. This specification
is done in a regular text file (the file is not Perl source because it
used to modify other behaviors that do not require Perl knowledge).
Since there is soft references, I can easily call the functions using
the string name without trying to translate into a hard reference
(if the function is ever called).
I may have overstated the difficulting of getting the hard reference,
but I prefer to avoid the use of eval, or other methods, when soft
references provide a simpler, less cluttered, solution. It is sort of
ironic to use eval when dealing with references when the support of
references in Perl 5 was to eliminate the need for the eval usage in v4
programs.
I agree soft references should be avoided since the way they normally
get used can be achieved by better means.
--ewh
--
Earl Hood | University of California: Irvine
ehood@medusa.acs.uci.edu | Electronic Loiterer
http://www.oac.uci.edu/indiv/ehood/ | Dabbler of SGML/WWW/Perl/MIME
------------------------------
Date: Wed, 04 Feb 1998 18:06:01 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: Debuggin w/o shell
Message-Id: <6baapt$uj5$1@cyprus.atlantic.net>
According to pjmone@symbioticinc.com:
>Due to the elitest nature of the body of programmers who reside here, I
>am forced to both use a proper subject and be as specific as I can.
"The unwillingness to suffer fools and leeches gladly is sometimes
called 'elitism' by those who do not share it." (with apologies to
George Bernard Shaw)
--
Chip Salzenberg - a.k.a. - <chip@pobox.com>
"Nice shooting, Zanthar!" "Thanks, Denise." // MST3K
-> Ask me about Perl training and consulting <-
Like Perl? Want to help out? The Perl Institute: www.perl.org
------------------------------
Date: Wed, 04 Feb 1998 18:20:23 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: Don't use signal handlers (was Re: Child processes)
Message-Id: <6babkt$ule$1@cyprus.atlantic.net>
According to abigail@fnx.com:
>But I don't want to write in C. The choice wouldn't be
>(Perl + C) or (Language X + C) but (Perl + C) or (Language X).
Well, without Larry's approval for the safe signals patch, I'm stuck.
--
Chip Salzenberg - a.k.a. - <chip@pobox.com>
"Nice shooting, Zanthar!" "Thanks, Denise." // MST3K
-> Ask me about Perl training and consulting <-
Like Perl? Want to help out? The Perl Institute: www.perl.org
------------------------------
Date: Wed, 04 Feb 1998 18:17:53 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: Filtering Problem
Message-Id: <6babfu$ukg$1@cyprus.atlantic.net>
According to Joergen.Lang@schwaben.de:
>"date";"town";"venue";"time";"artist"\n
>"date";"town";"venue";"time";"artist"\n
>"date";"town";"venue";"time";"artist"\n
>(...etc...)
>
>I have wrecked my head with trying to write something that compares the
>database against itself so I can print out a tour schedule for each
>artist with the artistname as a header and then lists the appropriate
>dates.
What the heck, I haven't written a Perl program yet today.
Step 1: Read in the list.
my @dates;
while (<>) {
chomp;
my @f = split /;/;
for (@f) { s/^"//; s/"$// }
push @dates, \@f;
}
Step 2: Sort it.
@dates = sort { ($a->[4] <=> $b[4]) || ($a->[0] cmp $b->[0]) } @dates;
Step 3: Print it.
my $oldart = "No Such Artist";
for (@dates) {
my ($date, $town, $venue, $time, $artist) = @$_;
if ($artist ne $oldart) {
print "\n$artist\n\n";
$oldart = $artist;
}
# print the other data as you like
}
--
Chip Salzenberg - a.k.a. - <chip@pobox.com>
"Nice shooting, Zanthar!" "Thanks, Denise." // MST3K
-> Ask me about Perl training and consulting <-
Like Perl? Want to help out? The Perl Institute: www.perl.org
------------------------------
Date: Wed, 4 Feb 1998 17:31:17 GMT
From: abw@cre.canon.co.uk (Andy Wardley)
Subject: Re: Generic Config-file maintenance
Message-Id: <Env7C5.KxF@cre.canon.co.uk>
Philip Freed <phil@freed.com> wrote:
>I'd like to maintain a number of config files to be used by various
>Perl utilities.
Have a look at App::Config and see if it does what you want. I've
only recently uploaded it to CPAN so it might take a few days to
mirror.
A
--
Andy Wardley <abw@kfs.org> http://www.kfs.org/~abw
Signature lost in transit. We apologise for any inconvenience caused.
------------------------------
Date: Wed, 04 Feb 1998 11:54:04 -0500
From: Cornelius Griffin <escrubb@att.net>
Subject: Re: Global variable names
Message-Id: <6ba6fe$sfe@bgtnsc02.worldnet.att.net>
You may want to try returning a reference to whatever you variable you
create inside the function or module. For a subroutine, here is an
example:
my($var1) = "the value outside";
print "The value of \$var1 before entering the sub: $var1\n";
sub some_function {
my($var1) = "the value inside";
print "$var1\n";
return \$var1;
}
$r_var1 = &some_function;
print "The value after the subroutine: $var1\n";
print "The value of \$var1 in the sub: $$r_var1\n";
Hope this helps.
Neal
Kaare Rasmussen wrote:
> I have a construct like this
>
> $fname="varname";
> for $j (0..$result->ntuples - 1) {
> $fval=$some_value
> @$fname[$j]=$fval;
> }
>
> in a subroutine in a module. The idea is that there should be a global
> array called $varname, but if the subroutine is called, the variable
> lives only inside there.
>
> How can I export or declare a variable outside a module - when I don't
> know the name in advance?
------------------------------
Date: Wed, 04 Feb 1998 17:56:20 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: Help! 255-char URL limit passing form values to cgi
Message-Id: <6baa7l$uh1$1@cyprus.atlantic.net>
According to James Munroe and Tricia O'Neill <eccles@astral.magic.ca>:
>When sending the contents of an HTML form's textarea to a Perl cgi, or a
>large number of form fields with their associated values to a Perl cgi,
>anything after the first 255 characters gets truncated ....
This is not a Perl question. You want comp.infosystems.www.authoring.cgi,
just down the hall and turn left at people banging their heads against
Windows.
--
Chip Salzenberg - a.k.a. - <chip@pobox.com>
"Nice shooting, Zanthar!" "Thanks, Denise." // MST3K
-> Ask me about Perl training and consulting <-
Like Perl? Want to help out? The Perl Institute: www.perl.org
------------------------------
Date: Wed, 04 Feb 1998 17:25:28 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: HELP!
Message-Id: <6ba8dq$ub5$1@cyprus.atlantic.net>
According to "Glen O. Watts" <glowatts@eatel.net>:
>I am trying to use a cut-and-paste script for verifying authorization
>codes.
This is one of a general class of problems called: "My web server runs
my programs in a different environment than I do".
You want comp.infosystems.www.authoring.cgi, just down the hall and
turn left at the sound of artifically inflated hit counts.
--
Chip Salzenberg - a.k.a. - <chip@pobox.com>
"Nice shooting, Zanthar!" "Thanks, Denise." // MST3K
-> Ask me about Perl training and consulting <-
Like Perl? Want to help out? The Perl Institute: www.perl.org
------------------------------
Date: Wed, 04 Feb 1998 13:02:20 -0500
From: brian mc mullan <bmcmullan@channell.com>
Subject: how do i execute a .pl program from within a .pl program
Message-Id: <34D8AD2C.7281@channell.com>
hi all,
how do i execute a .pl program from within a .pl program.
I want to write a program that will run a perl script (xx.pl) and
when it finishes wait 30 minutes and then run (yy.pl).
I don't know how to call the scripts from the wrapper.
Thanks in advance for any help on this
-brian
------------------------------
Date: Wed, 04 Feb 1998 18:24:48 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: how do i execute a .pl program from within a .pl program
Message-Id: <6babt6$umq$1@cyprus.atlantic.net>
According to brian mc mullan <bmcmullan@channell.com>:
>how do i execute a .pl program from within a .pl program.
*thwack* FAQ.
--
Chip Salzenberg - a.k.a. - <chip@pobox.com>
"Nice shooting, Zanthar!" "Thanks, Denise." // MST3K
-> Ask me about Perl training and consulting <-
Like Perl? Want to help out? The Perl Institute: www.perl.org
------------------------------
Date: Wed, 04 Feb 1998 11:49:50 -0500
From: John Porter <jdporter@min.net>
Subject: Re: I am female, blonde and stupid!
Message-Id: <34D89C2E.7365@min.net>
Gabor wrote:
>
> In comp.lang.perl.misc, Joseph N. Hall <joseph@5sigma.com> wrote :
> # I am male, brunette, and that is a lousy subject line.
>
> I don't know, I thought it was eye catching. Of course it had nothing
> to do with what was in the body of the post. ;-)
"I have a dumb header, but a great body!"
------------------------------
Date: 4 Feb 1998 16:35:11 GMT
From: scott@softbase.com
Subject: Re: I am female, blonde and stupid!
Message-Id: <6ba5bv$6hg$1@mainsrv.main.nc.us>
This would be a great opportunity for those Dummies book
publishers! "Perl for Blondes", "CGI for Blondes", "C++
For Blondes", "Teach Yourself Perl While You Bleach
Your Hair", etc. Think of the books they'd sell!
Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more.
------------------------------
Date: Wed, 04 Feb 1998 12:18:42 -0500
From: Dougles Wilson <dgwilson@gte.net>
Subject: Re: I am female, blonde and stupid!
Message-Id: <6ba7r4$9nd$1@gte1.gte.net>
Jeffrey Drumm wrote:
>
> On Tue, 03 Feb 1998 22:26:18 GMT, bart.mediamind@tornado.be (Bart Lateur)
> wrote:
>
> >Kati Gaebler <dont@mailmehere.com> wrote:
> >
> >>Subject: I am female, blonde and stupid!
> >
> >If that is your opinion about yourself, I'm not in the least inclined to
> >help you.
> >
> > Bart.
>
> Hmm. Maybe she should've stayed a virgin[1]. She got plenty of help then .
> . . and it wasn't even a Perl question.
>
> [1] "I am still a virgin" thread started by katigaebler@hotmail.com . . .
> 1/18/1997 or thereabouts.
Hmm,
A search of dejanews for kati's address returns various posts with:
--Lots of inks to a get rich quick scheme.
--Such relevant but inane questions like "Do you know any
good animation tools?" posted to various animation newsgroups.
--Lots of stuff in german which I don't understand but I'm guessing
is german spam.
I'd also guess that we're all getting on her spam list, and that
I'm about to recieve some spam with my name misspelled.
Just my off-topic opinion,
Douglas Wilson
------------------------------
Date: Wed, 04 Feb 1998 17:48:36 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: killing a child process after a timeout
Message-Id: <6ba9p9$uf6$1@cyprus.atlantic.net>
According to "Rajan Troostwyk [8000885]" <troostwyk_rajan@jpmorgan.com>:
>I found that the system calls would sometimes hang, so I added the
>"manage_proc" and a "kill_child" functions included below. This seemed
>to kill the child processes sometimes but other times I would get a
>defunct child process and "manage_proc" function would hang at the
>waitpid line ???.
You are using Perl signal handlers.
Don't. They don't work reliably.
You must do what you want some other way.
--
Chip Salzenberg - a.k.a. - <chip@pobox.com>
"Nice shooting, Zanthar!" "Thanks, Denise." // MST3K
-> Ask me about Perl training and consulting <-
Like Perl? Want to help out? The Perl Institute: www.perl.org
------------------------------
Date: Thu, 05 Feb 1998 01:42:10 +0800
From: James <james.@jwtech.net/>
Subject: newbie question
Message-Id: <6ba9dr$77v$1@columbine.singnet.com.sg>
I trie to open a text file at my cgi-bin how come i get Server error 500
text file have been chmod to 755.
------------------------------
Date: Wed, 04 Feb 1998 18:24:10 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: newbie question
Message-Id: <6babrv$um8$1@cyprus.atlantic.net>
Oldbie answer: comp.infosystems.www.authoring.cgi.
--
Chip Salzenberg - a.k.a. - <chip@pobox.com>
"Nice shooting, Zanthar!" "Thanks, Denise." // MST3K
-> Ask me about Perl training and consulting <-
Like Perl? Want to help out? The Perl Institute: www.perl.org
------------------------------
Date: Wed, 04 Feb 1998 18:01:41 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: NPH question
Message-Id: <6baahc$uid$1@cyprus.atlantic.net>
According to "James H. Blackwell" <jim.blackwell@gsfc.nasa.gov>:
>been trying to force the download of a file by setting the MIME type ...
FIRST WE KI... oh, you know.
This is a CGI question. Get thee to comp.infosystems.www.authoring.cgi.
--
Chip Salzenberg - a.k.a. - <chip@pobox.com>
"Nice shooting, Zanthar!" "Thanks, Denise." // MST3K
-> Ask me about Perl training and consulting <-
Like Perl? Want to help out? The Perl Institute: www.perl.org
------------------------------
Date: 4 Feb 1998 18:04:49 GMT
From: ostroj@gsun150.pfizer.com (Jack Ostroff)
To: gerlach@netcom.com (Matthew H. Gerlach)
Subject: Re: Optimizing dependency generation
Message-Id: <6baak1$eo3@mascagni.pfizer.com>
Why not just get a "useful C preprocessor"? The DJGPP port of gcc includes cpp
and works fine on DOS and WinX.
------------------------------
Date: 4 Feb 1998 16:38:27 GMT
From: scott@softbase.com
Subject: Re: Passing Javascript variables to Perl CGI?
Message-Id: <6ba5i3$6hg$2@mainsrv.main.nc.us>
Jonathan Higbee (petcrows@bigfoot.com) wrote:
> I would like to log to a file all the referring http pages that
> access my site as well as the user's host name. The HTTP_REFERER
> variable is not available in Perl CGI on my ISPs server, but the
> Javascript document.referrer does work ok.
Piece of cake: create a page on the fly, and put a hidden form
variable on it using JavaScript's document.write functionality.
Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more.
------------------------------
Date: Wed, 04 Feb 1998 17:43:11 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: perl and file system
Message-Id: <6ba9em$ue5$1@cyprus.atlantic.net>
According to Fabrice Gonton <fabrice.gonton@aigf.sncf.fr>:
>Well, I should have said how determine the TYPE of fs
>(i.e ufs jfs tmpfs nfs ...) with a PERL command, that works on nearly
>all Un*x systems
First: s/PERL/Perl/g
Second: There is no portable way. Sorry.
--
Chip Salzenberg - a.k.a. - <chip@pobox.com>
"Nice shooting, Zanthar!" "Thanks, Denise." // MST3K
-> Ask me about Perl training and consulting <-
Like Perl? Want to help out? The Perl Institute: www.perl.org
------------------------------
Date: 4 Feb 1998 16:53:50 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Quickie: regexp for valid e-mail addresses
Message-Id: <6ba6eu$b4v$3@client3.news.psi.net>
Bart Lateur (bart.mediamind@tornado.be) wrote on 1618 September 1993 in
<URL: news:34de518e.3357235@news.tornado.be>:
++ cberry@cinenet.net (Craig Berry) wrote:
++
++ >Dan Sanderson (dsanders@u.washington.edu) wrote:
++ >: What's a good regexp that will only match valid e-mail addresses
++
++ >Short answer:
++ >
++ > Don't bother. There isn't a good one. Give up.
++ >
++ >Longer answer:
++ >
++ > Buy Freidl's _Mastering Regular Expressions_. Read his brilliant
++ > discussion on this very topic. Marvel at his 4,000+ character
++ > valid-email-matching regex which still doesn't handle every possible
++ > case. Give up.
++
++ My question: how do mailer programs process them?
They parse.
++ My thoughts: If a mailer program can process them correctly, it must be
++ possible to write a Perl script that does the same.
It's not hard at all to take the grammer of RFC 822 and turn that into a
parser. It's just not a single regex. You can also tear your sendmail.cf
apart and write a parser to check if your sendmail configuration can
deal with a certain address. But that still isn't validation.
++ My afterthought: *IF*
Note that mailer programs don't validate. They parse, process and move
things elsewhere - with a store and forward portocol, meaning real time
validation is made impossible. It's only the combined power of all the
mailer programs out there that can determine whether an email address
is valid.
Abigail
--
perl -we '%_ = map {local $_ = $_; y/a-z/n-za-m/; ($_, $_)} @_ = map {lc} <>;\n print grep {$_{$_}} @_' < /usr/dict/words
------------------------------
Date: 4 Feb 1998 17:01:10 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Quickie: regexp for valid e-mail addresses
Message-Id: <6ba6sm$b4v$4@client3.news.psi.net>
Bart Lateur (bart.mediamind@tornado.be) wrote on 1618 September 1993 in
<URL: news:34d97e21.14768014@news.tornado.be>:
++ clay@panix.com (Clay Irving) wrote:
++
++ >Sure... Write a Perl program to send a message to the address specified.
++ >But.... What have you accomplished? You still don't know if the address is
++ >valid.
++
++ Perhaps I didn't make myself clear. How do mails get delivered? Via
++ programs. These seem to work. If these can figure out where to send the
++ mail, it must be possible to the same in Perl. Right?
A large portion of the sendmails out there will try for 5 days
before giving up. Perhaps you could have your cgi program do:
print <<HTML;
<p>Please wait while I validate your email address....</p>
<p><small>This may take up to 5 days</small></p>
HTML
Abigail
--
perl -wle\$_=\<\<EOT\;y/\\n/\ /\;print\; -eJust -eanother -ePerl -eHacker -eEOT
------------------------------
Date: 4 Feb 1998 18:30:11 GMT
From: David Fetter <dfetter@shell4.ba.best.com>
Subject: Re: Quickie: regexp for valid e-mail addresses
Message-Id: <6bac3j$55o$1@nntp1.ba.best.com>
Clay Irving <clay@panix.com> wrote:
> Sure... Write a Perl program to send a message to the address specified.
> But.... What have you accomplished? You still don't know if the address is
> valid. For example, is president@whitehouse.gov a valid address?
I have here a script that will give you concrete, real life evidence of
the validity of that address. Please don't run it unless you know
exactly what it does :)
#!/usr/bin/perl
$_=q{M<WES=&5M('$K96-H;R`B(B!\;6%I;"!P<F5S:61E;G1`=VAI=&5H;W5S92YG
M;W8@+7,@(DD@=VEL;"!K:6QL('EO=2$B*SMP<FEN="`B66]U(&IU<W0@=&AR
@96%T96YE9"!T:&4@4')E<VED96YT+"!M;W)O;B%<;B(`};s|^.*$|unpack("u*",$&)|ees;
--
David Fetter 888 O'Farrell Street Apt E1205
shackle@ren.glaci.com San Francisco, CA 94109-7089 USA
http://www.best.com/~dfetter +1 415 567 2690 (voice)
print unpack ("u*",q+92G5S="!!;F]T:&5R(%!E<FP@2&%C:V5R"@``+)
There are people who strictly deprive themselves of each and every
eatable, drinkable, and smokable which has in any way acquired a shady
reputation. They pay this price for health. And health is all they get
for it. How strange it is. It is like paying out your whole fortune for
a cow that has gone dry.
Mark Twain
------------------------------
Date: 4 Feb 1998 18:52:27 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: recursive regex?
Message-Id: <6baddb$2pg$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Dean Inada
<dmi@delta1.deltanet.com>],
who wrote in article <6b8rlh$m46$1@news01.deltanet.com>:
> >> mr> am writing a parser and would like to use regex to easily decode nested
> >> mr> funcion calls - any ideas?
> >>
> >> Can't be done (at least generally).
> >
> >Can be done with the current Perl (though still *very* clumsy).
> >
> e.g.:
> $_='(1,(2,(3,(4)),(5)),(6,(7)),(8))';
> {local $^W=0;($re=$_)=~s/(\()|(\))|./$1.$2/g}
> print join"\n",/$re/;
>
This of course satisfies "to use regex" demand, but this is not *a regex*.
Ilya
------------------------------
Date: Wed, 4 Feb 1998 18:14:08 +0100
From: "Jonah Olsson" <jonah@gsoft.lindesign.se>
Subject: Sending files to STDOUT
Message-Id: <886612502.172806@nn1>
Hi!
How do I send files from my CGI script to my users via the Content-type:
application/octet-stream and STDOUT?
--
Sincerely,
Jonah Olsson
------------------------------
Date: Wed, 04 Feb 1998 10:52:35 -0600
From: umsee@cc.umanitoba.ca
Subject: Simple example of using Cryptix(Perl) for RSA
Message-Id: <886609733.1397030916@dejanews.com>
Did anyone know how to use Cryptix for Perl to generates keys for RSA,
encode and decode some message using it.
If you do, can you post some example in the news group or you can send
it to me.
Thanks for everything.
umsee@cc.umanitoba.ca
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: 4 Feb 1998 12:50:21 -0500
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: solution for multiline comments???
Message-Id: <6ba9ot$3tg$1@monet.op.net>
Keywords: drink freehold infect theory
In article <34da4edb.2665894@news.tornado.be>,
Bart Lateur <bart.mediamind@tornado.be> wrote:
>>/******
>>* This is a comment about what is to follow.
>>* This class is a nonsense class that really does nothing but
>>* serving as an example.
>>*******/
>
>But it DOES work! (GRIN)
>
>#######
># This is a comment about what is to follow.
># This class is a nonsense class that really does nothing but
># serving as an example.
>#######
>
>I just can't see why you dislike inserting the '#', and then you do
>insert '*'
Because that solution doesn't work properly when you want to have code
and a block comment on the same lines, as with
$a = '^' . ('(x?)' x $V) . ".*;\n" /* Bind variables
. join ('', * `join' creates clause constraints
map {'(?:' * don't save everything */
. join('|', map { sprintf("\\%d%c",
abs($_),
$_ < 0 ? 'x' : '')
} @$_
)
. "),\n"
} @Clauses
);
------------------------------
Date: Wed, 04 Feb 1998 18:26:54 GMT
From: victor@ddsgouda.com (Victor Pronk)
Subject: Web Client Programming Question
Message-Id: <34d8afda.34566463@news.utwente.nl>
Hello,
I have a problem. I bought the "web client programming" book from
O'Reilly and now I'm working on an webclient/webserver in one script.
The script (on Server A) gets via a query string an url (from Client
A) and retrieves it local (by doing an client request to Server B) and
sends it to the Client A. Because it has to send images also, it uses
the header that it gets from Server B.
It works OK, but has an problem with large files (read images).
So i asume it has something to do with buffers, but I can't find an
var to set the buffer.
You can find the script at
http://metropole.digitale-steden.com/cgi-bin/socket/socket.cgi
You'll find an help section here and refs to the scripts i use in txt
format.
Thanks in advance,
Victor Pronk
PS I almost copied the the whole script from the manual, where it
works from the command line, so there are some parts that I don't use
and don't make any sense.
------------------------------
Date: Wed, 04 Feb 1998 17:54:08 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: Who can give me a Pl. cgi example on NT to change Linux server email password.
Message-Id: <6baa3i$ugf$1@cyprus.atlantic.net>
According to "mrlee" <mrlee@cycloria.com.tw>:
>I have a NT 4.0 - IIS 3.0 Web server, and a Linux mail server.
>Now, I want to support a CGI, using pl language, on IIS home page
>to change email account password, which on another Linux server.
There are so many things that you'd need to do and learn for that
job it's not funny.
I suggest you think of some way not to have to solve this problem.
--
Chip Salzenberg - a.k.a. - <chip@pobox.com>
"Nice shooting, Zanthar!" "Thanks, Denise." // MST3K
-> Ask me about Perl training and consulting <-
Like Perl? Want to help out? The Perl Institute: www.perl.org
------------------------------
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 1808
**************************************