[8195] in Perl-Users-Digest
Perl-Users Digest, Issue: 1813 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 5 00:07:58 1998
Date: Wed, 4 Feb 98 21:00:20 -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: 1813
Today's topics:
Re: 'require' dir same as app's? (Ken Irving)
Re: Date Comparison <ebohlman@netcom.com>
Re: Date Comparison (I R A Aggie)
Re: Date Comparison (Eric Weiss)
Re: eval FAQ??? Hardest part of perl to figure out <ebohlman@netcom.com>
Re: help: open an existing page and replace parts of it (Johnny Fingers.)
Re: Inverse of a regex <*@qz.to>
Re: Is file locking necessary? (David Efflandt)
Re: Is Perl 5 year 2000 compliant? <cpratt@nzsupport.nzdb.com>
Re: Is Perl 5 year 2000 compliant? (Tiberius)
Re: Is this correct? File Locking (Anthony Boyd)
Re: Mail checker.... <*@qz.to>
Re: Module to handle BIND zone files? (Michael Fuhr)
Moron Newbie <<Please Help!>> <robertm@cc.wwu.edu>
need help bad! zonpower@zonified.com
Need help with multi-line regexp <blairhj@intnet.net>
Re: Newbie about plunge into Perl asks... (Steve Linberg)
Perl to Exchange jhardy@cins.com
Re: Perl to Exchange (Joshua J. Kugler)
Re: Quickie: regexp for valid e-mail addresses (Woody Jin)
Re: Quickie: regexp for valid e-mail addresses (Woody Jin)
Re: Quickie: regexp for valid e-mail addresses (Iain Chalmers)
run another process in backgorund <daryl@stonemicro.com.au>
Re: solution for multiline comments??? (Chip Salzenberg)
Re: Tie-Dee-Perl (Cleanliness is next to Goodliness, or <*@qz.to>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 5 Feb 98 02:15:25 GMT
From: systech@polarnet.com (Ken Irving)
Subject: Re: 'require' dir same as app's?
Message-Id: <34d920bd.0@news.randori.com>
In article <6bb1sc$cif$1@marina.cinenet.net>, cberry@cinenet.net says...
>
>Martin Vorlaender (martin@RADIOGAGA.HARZ.DE) wrote:
>: Craig Berry (cberry@cinenet.net) wrote:
>: : 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.
>:
>: use FindBin;
>: use $FindBin::Bin;
>:
>: See the modules POD for gotchas.
>
>Perfect! Thanks very much for the info. Now, for my future edification,
>how could I have found this in the FAQ? Even knowing what I'm looking for
>(as I do now), I see no trace of this. Perhaps I'm just being blind.
FAQ != All Available Perl Documentation Resources
You could have looked at the names of all the installed modules, and
looked for some likely candidates, and maybe grepped /perl/lib/* for
directory. I did that on my system and came up with the following, out
of 88 hits (of course, this is easy with hindsight).
\perl\lib\findbin.pm: FindBin - Locate directory of original perl script
I have had similar difficulties finding ways to do things when sometimes it
isn't obvious how to even begin looking, or wading through listings and
summaries searching for a solution. IMHO, this is appropriate fodder for
this newsgroup, but I think what gets folks riled is when the subject *is*
in the FAQ.
Ken
>
>---------------------------------------------------------------------
> | 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."
--
Ken Irving, SysTech Control, systech@polarnet.com, 907.456.1694
------------------------------
Date: Thu, 5 Feb 1998 02:05:24 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Date Comparison
Message-Id: <ebohlmanEnvv50.Bpy@netcom.com>
Anthony Kan <akan@atlas.ca> wrote:
: Ok I realize I might get flamed for this...but.
: I would like to compare dates. From the DB I get 01-Jan-1998 and I would
: like to compare it to the current date to see if the first date is less than
: a year ago. Since the server is running Perl 4 I don't really have the
: option to just blast in a pm and be done with it.
Assuming that you're truly stuck with Perl 4, even after the adminstrator
of your server has been told that there are several well-know security
problems with it, you have a few choices:
1) Download some of the Perl 5 date modules from CPAN, read their code,
and figure out how to "port" it to Perl 4.
2) Pay a programmer to write the code you want in Perl 4. Because Perl 4
is obsolete, you're unlikely to find anyone who will volunteer to do it;
it's basically "nuisance work."
------------------------------
Date: Wed, 04 Feb 1998 21:04:03 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Date Comparison
Message-Id: <fl_aggie-0402982104030001@aggie.coaps.fsu.edu>
In article <6baqk5$c1o1@crash.videotron.ab.ca>, "Anthony Kan"
<akan@atlas.ca> wrote:
+ Since the server is running Perl 4 I don't really have the
+ option to just blast in a pm and be done with it.
Sure, you do. Just tell the person(s) responsible for the server that
perl 4 is dead, dead, dead, is CERTifiably insecure, that there
are no plans to ensure v4 is Year2000-safe, and it is unsupported.
If that doesn't get 'em to upgrade to v5, then check their pulse. You
may have job openings... :)
In the mean time, you could take apart DateCalc and see how it does
things.
James
--
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>
------------------------------
Date: Wed, 4 Feb 1998 22:18:31 -0500
From: eweiss@winchendon.com (Eric Weiss)
Subject: Re: Date Comparison
Message-Id: <MPG.f42f992a8751d2f9896a7@news.dgsys.com>
Just use a regular expression to pull apart the DB date
and the system date. For example, the statement:
($day, $month, $year) = /(\d+)-(\w{3})-(\d{4})/;
should pull apart 01-Jan-1998
You can use a hash to convert month abbreviations to a number. By 'a
year ago' do you mean this day and month last year, 365 days, or
366 days?
Eric
------------------------------
Date: Thu, 5 Feb 1998 01:54:49 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: eval FAQ??? Hardest part of perl to figure out
Message-Id: <ebohlmanEnvunD.ALo@netcom.com>
Chris Sherman <sherman@unx.sas.com> wrote:
: I'm usually ok with eval, but sometimes I just can't figure why it
: doesn't work the way I want it to sometimes.
: Does anyone of an eval FAQ or an eval cookbook of, say, 50 different ways
: of using eval in all kinds of different situations? Even a "top 10 things
: to remember when putting together an eval line"-type thing would be
: great...
Run, do not walk, to your nearest bookstore and grab yourself a copy of
Sriram Srinivasan's _Advanced Perl Programming_, which has a whole
chapter on how to use eval in both its string and block personalities.
------------------------------
Date: Thu, 05 Feb 1998 02:31:28 GMT
From: wyldkard@total.net (Johnny Fingers.)
Subject: Re: help: open an existing page and replace parts of it
Message-Id: <MPG.f42eec48432720f989680@news.videotron.ca>
In article <MPG.f42b10120794d22989680@news.total.net>, wyldkard@total.net
says...
> In article <#E3#WgcK9GA.59@upnetnews03>, ilia@detoronics.net says...
> > Hello, I'm a beginner in Perl, and was wondering if there is an easy way to
> > open an existing html page, replace specific parts of it, and return the new
> > page to client.
> >
> > So if the page has something like this:
> >
> > <HEAD><TITLE>%%title%%</TITLE></HEAD>
> >
> > I want to replace %%title%% with something else.
> >
> > Is there a pre-made function that does this?
> >
> > Something like
> > &f_ReplaceAll (@Array, $html_page);
> > where @Array can be an associative array with placeholders and corresponding
> > replacements?
> >
> >
> >
> Hey
>
> I don't know of any pre-existing libraries to do this. But I've done it
> already in a few projects and have my own libs for it. Here's an example
> of what it looks like. I know ther are other ways to do it, but hey..
> this works! :)
>
> Let me know if this helps.
>
> #!/usr/bin/perl
>
> ########## global variables.
> $HtmlFile = "htmlpage.html";
> $ListingDir = "/usr/home/wyldkard/TestingZone/";
> $AbsPath = $ListingDir . $HtmlFile;
> $ReplaceVariable = "THIS IS THE TITLE\n";
> ########## end global.
>
> ########## Main programming.
> &CreateNew();
> ########## End Main programming.
>
> sub CreateNew {
> my($ReadReference) = &ReadFile($AbsPath);
> $fileline = <$ReadReference>;
> while (!eof()) {
> chop($fileline);
> if ($fileline =~ '%%title%%'){
> $fileline =
> "<HEAD><TITLE>$ReplaceVariable</TITLE></HEAD>\n";
Sorry I found something I left out. This snippet.....
# ** original text **
foreach $GoodLines (@GoodLines) {
print $WriteReference ("$GoodLines\n");
}
undef(@GoodLines);
# ** end original code **
Should look like this....
foreach $GoodLines (@GoodLines) {
print $WriteReference ("$GoodLines\n");
}
undef(@GoodLines);
close($WriteReference);
My apologies, as without the close statement, you wouldn't be able to
parse multiple files automatically.
--
--------------------------------
J.Fingers - wyldkard@total.net
--------------------------------
------------------------------
Date: 5 Feb 1998 02:43:05 GMT
From: Eli the Bearded <*@qz.to>
Subject: Re: Inverse of a regex
Message-Id: <qz$9802042125@qz.little-neck.ny.us>
Michael Genovese <mikeg@slpma8.ed.ray.com> wrote:
> Doug wrote:
> > $line = "From: Fred Bloggs <fred.bloggs@network.com>"
> > $line =~ s/(\<.*?\>)//g;
You do not want a regex.
> Try :
>
> $line = "From: Fred Bloggs <fred.bloggs\@network.com>";
$line = 'From: Fred Bloggs <fred.bloggs@network.com>';
> The "\@" is required by perl because "@" is a "special character.
If you don't want interpolation, don't use double quotes.
> $line =~ s/.*(\<.*?\>).*/$1/g;
This will fail for some addresses.
use Mail::Address; # Part of Mailtools, IIRC
$line = s/^From:\s*//i;
$parsed = (Mail::Address->parse($line))[0];
$address = $parsed->address();
> What you want is not the "opposite" of a regex, but
> to "save" the results of a pattern match (within the "()") and
> then refer to it later. In this case, via "$1".
Yeah that will help him with REs in general, but this is not a problem
you want to apply REs to. Trust me on this one, I know something about
REs and I know something about email addresses.
Elijah
------
#!/usr/bin/perl -- -*- my ny.pm sig -*-
$_=$^ ;s;s;sss;;s^.^ju^&&s&P+&\n&&&(s(_..)(ers)||s|^|^^|)&&s(T)(q(st%eg))eg;
s<.(o).><$& new 1$$>i+s+\dst.+$a--||reverse(q(rep k))+ge;s*%.+u* so+*i;s=\++
="me"=mex&&s%ege%l$"hke%;$a||s/^\S+ /\/\//;s;\d+;yor;;s[KE]<ac$&>i;print $_;
------------------------------
Date: Thu, 05 Feb 1998 04:45:22 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Is file locking necessary?
Message-Id: <34da3ef4.2626760@flood.xnet.com>
"Bill Genzer" <bill@fathead.net> wrote:
>I am very new at PERL and I have just started writing my own CGI scripts
>(really editing other scripts). I have to admit it seems very simple and
>easy to learn. My question is if it is necessary to lock files before
>reading or writing to files? If it is necessary, how do you do it? I've
>seen a few ways other people do it, but it seems very complicated, I've
>heard of using something called flock? But not knowing hardly anything
>about PERL I have no Idea how to use it.
>
>I've done a few small tests myself to see what would happen if a user tried
>to update the same file at the same time and I can't seem to get it to mess
>up, Is there some kind of file locking/sharing feature built in to PERL? Or
>do you have to still do it manually?
>
>Thanks
>-Bill
I had one script that simply tested each line that it loaded to print
a limited list in a perl CGI and it would sometimes go into an endless
loop if more than one instance of the script tried to access it at the
same time (maybe they were fighting for the file pointer). Initially
I used an alarm to cancel if not finished in 30 seconds until I
figured out how to flock.
But I never had any trouble with a script that reads or writes a whole
file, so maybe file locking is more critical when reading or writing
one line at a time than an entire file.
There is an example of file locking you click on the hit counter on my
home page.
David Efflandt/Elgin, IL USA
efflandt@xnet.com http://www.xnet.com/~efflandt/
------------------------------
Date: Thu, 05 Feb 1998 14:41:34 +1300
From: Cliff Pratt <cpratt@nzsupport.nzdb.com>
Subject: Re: Is Perl 5 year 2000 compliant?
Message-Id: <34D918CE.EDDCF23C@nzsupport.nzdb.com>
David Lee Lambert wrote:
>
> > ++ > Does anyone know of any problems with Perl 5 and Y2K?
>
Is this the same thread that was going at least a year ago?
Cliff
------------------------------
Date: Thu, 05 Feb 1998 04:03:11 GMT
From: Abraxas@hell.com (Tiberius)
Subject: Re: Is Perl 5 year 2000 compliant?
Message-Id: <34da39a4.1384166@sd.znet.com>
> RTFM...
Why do perl-ers so often insist on posting this worthless response,
instead of just shutting up and not replying to what they believe is a
stupid post?
Why?
------------------------------
Date: Wed, 04 Feb 1998 20:38:13 -0800
From: anthony@outshine.com (Anthony Boyd)
Subject: Re: Is this correct? File Locking
Message-Id: <anthony-0402982038230001@anthony.outshine.com>
Jon Drukman <jsd@hudsucker.gamespot.com> wrote:
> Bill Genzer <bill@fathead.net> wrote:
>
> : flock(FILE,8);
>
> don't ever do this. i don't know why it's in the faq, but randal
> yelled at a friend of mine when said friend posted something including
> this. so don't do it. close takes care of it for you.
Can anyone explain the reasoning behind this? I understand that close
takes care of unlocking the file, but I didn't realize it was poor coding
to do otherwise. In fact, I felt like explicitly stating the unlock was
"good coding". I wan't to change that if there is a compelling reason.
-Tony
------------------------------
Date: 5 Feb 1998 02:51:48 GMT
From: Eli the Bearded <*@qz.to>
Subject: Re: Mail checker....
Message-Id: <qz$9802042135@qz.little-neck.ny.us>
Premgith Vidyanandan <vidyanan@pilot.msu.edu> wrote:
> I want to write a perl program that goes through my mail folder and based
> on the header of the mail or using the from address it puts the mail into
> separate folders..... I know that the mail file is kept in /var/mail... I
> just want to know the best way to read mail by mail as opposed to line by
> line and then to move the create a file and move the mail into that
> file...
If you *really* want to read mail by mail, then you should study the
$/ input-record-seperator variable.
$/ = "\nFrom ";
open(MAIL, $ENV{MAIL}) or die "Fooey: $!";
@mbox = <MAIL>;
print 1+$#mbox," pieces of mail loaded\n";
> The programming part I can do but I would like to know how to access
> mail by mail as opposed to line by line....
Assuming a standard Unix mailbox, of course.
Elijah
------
did this line by line when he wrote such a tool
------------------------------
Date: 4 Feb 1998 19:13:16 -0700
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: Module to handle BIND zone files?
Message-Id: <6bb77s$23i@flatland.dimensional.com>
devin@premier1.net (Devin L. Ganger) writes:
> I've searched CPAN and the web trying to find this without any luck, so
> if anybody knows a URL that I missed, please point me the right way. I
> am looking to see if anyone has any modules available that can parse zone
> files for BIND, and can write them back out.
>
> I think my skills are up to this task, but why re-invent the wheel?
Net::DNS can parse strings and return a resource record object:
$rr = new Net::DNS::RR("foo.com MX 10 mailhost.foo.com");
It wasn't designed to read entire zone files, however, so you'd
have to do some preprocessing to handle something like this:
foo.com. SOA ns1.foo.com. hostmaster.foo.com. (
1998020401 ; serial
10800 ; refresh
3600 ; retry
2592000 ; expire
86400) ; default
NS ns1.foo.com.
NS ns2.foo.com.
MX 10 mailhost.foo.com.
You could grab the zone with a zone transfer and then print each
record -- the following example should give you something very close
to what your zone file looks like:
$res = new Net::DNS::Resolver;
$res->nameservers("ns1.foo.com");
foreach $rr ($res->axfr("foo.com")) {
$rr->print;
}
Be warned that Net::DNS is written entirely in Perl, so it's not nearly
as fast as nslookup, dig, or named-xfer. A zone transfer of thousands
or tens of thousands of records (not unusual for a large company) can
take several minutes.
You might also contact the author of the Net::Bind module -- the README
indicates he planned to add support for handling zone files in a future
release. The current version (0.01) is nearly a year old though, so
I don't know if he ever got around to it.
--
Michael Fuhr
http://www.dimensional.com/~mfuhr/
------------------------------
Date: Wed, 4 Feb 1998 18:20:44 -0800
From: "Robert Murphy: The Next Generation" <robertm@cc.wwu.edu>
Subject: Moron Newbie <<Please Help!>>
Message-Id: <Pine.SOL.3.96.980204181201.17209C-100000@titan.cc.wwu.edu>
Dear All,
I am attempting to make a sort of pine-like program but I want to
have extended characters making up the outline (\x80-\xff) I attempted to
make a quick little program that would for that, two 'for' loops counting
from 0 to 15 and then changing them with (0..9,'a'..'f')[$var] into hex
digits. When I got to print out ($var1*16)+$var2 . " =
\x${var1h}${var2h}\n"; all I see is the numbers! Is there anyway to trick
perl into treating something like "\xae"? I really don't want to have to
type out all 256 of these bad boys.
Sorry if I'm being an ignoramous! :( (dont kill me)
Robert Murphy
------------------------------
Date: Thu, 05 Feb 1998 02:34:31 GMT
From: zonpower@zonified.com
Subject: need help bad!
Message-Id: <34d924eb.2422305@news.erols.com>
Hello all. I am searching for a perl script that will convetr pcx
files to gif or jpg. I am looking for it to run on either a unix or
windows 95/nt system. Please email zonpower@zonified.com Any help or
info would be appreciated
------------------------------
Date: Wed, 04 Feb 1998 21:44:24 +0000
From: "Hugh J. Blair" <blairhj@intnet.net>
Subject: Need help with multi-line regexp
Message-Id: <34D8E138.6D82@intnet.net>
Help ! I'm a perl newbie so this could make or break my perl career.
I'm trying to extract multi-line block of text from a very large file.
I can specify the begin pattern and the end pattern. The variation is a
string in the middle.
Any help will be greatly appreciated.
Thanks, Hugh Blair
--
_______________________________________________________
Some foolish people think science takes the wonder out of the universe;
the exact opposite is true.
Genuine understanding is not only more useful than superstition or myth;
it is always much more interesting. Arthur C. Clarke
_______________________________________________________
------------------------------
Date: Wed, 04 Feb 1998 22:14:32 -0500
From: see-below@crocker.com (Steve Linberg)
Subject: Re: Newbie about plunge into Perl asks...
Message-Id: <see-below-0402982214320001@pri03-011.oldcity.dca.net>
In article <34d8cbfa.1248613@news.easynet.co.uk>, postmaster@127.0.0.1
(Robbie Baldock (real email address at foot of message)) wrote:
> After having built up a reasonable knowledge of Java and JavaScript
> I'm about to add to my repertoire by attempting to learn Perl.
> However, I have a couple of questions:
>
> 1. I've installed the Win32 port of Perl 5 but the machine that will
> be running the scripts is a Unix machine. Am I likely to run into
> troubles developing in Win95 and running in Unix?
You might - depending on whether you use and depend on Win32-specific
stuff. If you're doing CGI, there are some important differences between
M$ NT servers and UNIX servers, but this is not a Perl issue per se. NT
does not support some of the important Perl modules you will read about
below.
> 2. Need a good book. Probably going to go for O'Reilly's "Programming
> Perl" bible unless anyone can recommend other titles. Actually,
> related to the above question, should I buy a book on Win32 Perl (I
> see O'Reilly has one of those too!) as well or will a general Perl
> manual suffice?
You are correct. Get the Bible. Get "Advanced Perl Programming" when
you're ready. I've heard the Win32 Perl book is good too. And get all of
the FAQs while you're at it.
Have fun!
--
slinberg@ com
crocker.
Try that one, spambots!
------------------------------
Date: Wed, 04 Feb 1998 21:11:57 -0600
From: jhardy@cins.com
Subject: Perl to Exchange
Message-Id: <886647559.1346699278@dejanews.com>
What have I gotten myself into??? Im putting together a website on IIS
4.0 and I am programming in Perl. I usually work on UNIX for websites but
this particular client is on MS. All I want to do is create a Perl script
for a mailing list. When I got to the point of asking for the path to
sendmail they explained they were using MS exchange 5.0 or 5.5 . I have
never used exchange and I have no idea on how to access it with PERL to
send mail. From what I have been told there is no way to do it. This
can't be true! can anyone help out here?
John
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Thu, 05 Feb 1998 04:05:33 GMT
From: jkugler@inreach.com (Joshua J. Kugler)
Subject: Re: Perl to Exchange
Message-Id: <34d93a0f.48177903@news.inreach.com>
Use the Mail::* or the Net::SMTP modules and do the sending yourself.
It is much easier, and you can control the from, to, cc, bcc headers,
and whatever else.
j----- k-----
who thinks M$ needs to admit *nix is better and give up
On Wed, 04 Feb 1998 21:11:57 -0600, jhardy@cins.com wrote:
()What have I gotten myself into??? Im putting together a website on
IIS
()4.0 and I am programming in Perl. I usually work on UNIX for
websites but
()this particular client is on MS. All I want to do is create a Perl
script
()for a mailing list. When I got to the point of asking for the path
to
()sendmail they explained they were using MS exchange 5.0 or 5.5 . I
have
()never used exchange and I have no idea on how to access it with PERL
to
()send mail. From what I have been told there is no way to do it. This
()can't be true! can anyone help out here?
I read this group. Sometimes my ISP doesn't. Please e-mail too.
Joshua J. Kugler
Computer Consultant--Web Developer
jkugler@inreach.com
http://www.cwebpages.com/jkugler
Every knee shall bow, and every tongue confess, in heaven, on earth, and under the earth, that Jesus Christ is LORD -- Count on it!
------------------------------
Date: Thu, 05 Feb 1998 03:07:27 GMT
From: wjin@cs.uh.edu (Woody Jin)
Subject: Re: Quickie: regexp for valid e-mail addresses
Message-Id: <6bbatf$c8u$1@Masala.CC.UH.EDU>
In article <6ba6eu$b4v$3@client3.news.psi.net>, abigail@fnx.com wrote:
>Note that mailer programs don't validate.
Mailer programs don't validate, but we can use mail daemons.
For example, I remember that I was able to use - I don't remember the
option correctly - "/usr/lib/sendmail -bv user@host.name"
to see whether it is deliverable (it may not work correctly depending
on the sendmail configuration. but then you can set up the config
file and use sendmail option to use the alternate config file).
Also, you can directly telnet to the mail port and use VRFY command.
For example, "telnet cs.uh.edu 25" and then,
"VRFY wjin@cs.uh.edu" will give you, my name and e-mail address
"VRFY wwwwjin" will give you "User unknown".
So, there is obviously a way to verify users.
Cheers,
--
Woody
------------------------------
Date: Thu, 05 Feb 1998 03:22:45 GMT
From: wjin@cs.uh.edu (Woody Jin)
Subject: Re: Quickie: regexp for valid e-mail addresses
Message-Id: <6bbbq6$c8u$2@Masala.CC.UH.EDU>
In article <6ba6eu$b4v$3@client3.news.psi.net>, abigail@fnx.com wrote:
>Note that mailer programs don't validate.
Mailer programs don't validate, but we can use mail daemons.
For example, I remember that I was able to use - I don't remember the
option correctly - "/usr/lib/sendmail -bv user@host.name"
to see whether it is deliverable (it may not work correctly depending
on the sendmail configuration. but then you can set up the config
file and use sendmail option to use the alternate config file).
Also, you can directly telnet to the mail port and use VRFY command.
For example, "telnet cs.uh.edu 25" and then,
"VRFY wjin" will give you, my name and e-mail address
"VRFY wwwwjin" will give you "User unknown".
So, there is obviously a way to verify users.
Cheers,
--
Woody
------------------------------
Date: Thu, 05 Feb 1998 15:40:14 +1100
From: bigiain@mightymedia.com.au (Iain Chalmers)
Subject: Re: Quickie: regexp for valid e-mail addresses
Message-Id: <bigiain-ya02408000R0502981540140001@news.ozemail.com.au>
In article <6bbbq6$c8u$2@Masala.CC.UH.EDU>, wjin@cs.uh.edu (Woody Jin) wrote:
<-snip->
> Also, you can directly telnet to the mail port and use VRFY command.
> For example, "telnet cs.uh.edu 25" and then,
> "VRFY wjin" will give you, my name and e-mail address
> "VRFY wwwwjin" will give you "User unknown".
> So, there is obviously a way to verify users.
this is great when it works, BUT...
there are many reasons why this may not work all the time, simple ones like:
$ telnet cs.uh.edu 25
Trying 129.7.192.1...
telnet: Unable to connect to remote host: Connection refused
$
to slightly more complex ones - such as my email address, which has a
domain of mightymedia.com.au, by my mail is handled by two other machines:
$ host mightymedia.com.au
mightymedia.com.au has address 203.2.192.124
mightymedia.com.au mail is handled (pri=200) by server3.syd.mail.ozemail.net
mightymedia.com.au mail is handled (pri=100) by oznet02.ozemail.com.au
$
which is manageable by doing host lookups if you tried, but there's also
mailservers which are on a dialup connections, and you'd have to be really
luck to happen to be trying to telnet into them during the few minutes each
connection that they're up...
so, how about we make that:
"So, there is obviously a way to verify *some* users using *some*
configurations of *some* versions of *some* mail servers *some* of the
time."
thats a lot of *somes*'s (and i'm sure i haven't got them all)
i'm pretty sure the only good options are
1 to send them some mail and ask them to answer (or send them a password or
whatever - like the NY Times website - this works if your site is
"valuable" enough to warrant people bothering to jump thru the hoops)
2 to look at the email address they give you and say "that doesn't look
like a valid email address, are you sure you typed it in correctly?" and
believe them if they say yes (for when people like Eli the Bearded
<*@qz.to> visit your site)
or
3 don't worry about it (and clean your email address database as you get
bounces)
cheers
iain
(lets see - if its 50% of the users of 50% of the configurations of 50% of
the versions of 50% of the mail servers 50% of the time, that means about
95% of valid email addresses would fail!!!)
Iain Chalmers
bigiain@mightymedia.com.au
------------------------------
Date: 05 Feb 1998 09:56:09 -1000
From: Daryl Sayers <daryl@stonemicro.com.au>
Subject: run another process in backgorund
Message-Id: <u54t2domg6.fsf@marge.stone.oz.au>
I want to spawn off a process from my perl script that will run
in the background. I dont wish to wait for its return etc. The
child process should be run as a background process and may last
longer than the life of the perl script it was started from. Basically
I want the same function as the & on a shell.
eg:
#/usr/bin/perl
@args = ( "myapp", "Here i am with a comment", "&");
system ( @args, );
print "Here I am non blocked after running app\n";
PS: This dont work.....
------------------------------
Date: Thu, 05 Feb 1998 04:33:35 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: solution for multiline comments???
Message-Id: <6bbfi2$vu6$1@cyprus.atlantic.net>
According to rjk@coos.dartmouth.edu:
>Chip Salzenberg wrote:
>> Pod (or rather =... =cut) *is* very definitely part of the Perl language.
>> That _is_ Perl's multiline comment syntax.
>
>A good multiline commenting syntax shouldn't be so ambiguous.
If you're looking for context-independence, you're using the wrong
language. :-,
--
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: 5 Feb 1998 02:30:34 GMT
From: Eli the Bearded <*@qz.to>
Subject: Re: Tie-Dee-Perl (Cleanliness is next to Goodliness, or Perl-White Code)
Message-Id: <qz$9802042114@qz.little-neck.ny.us>
Jason Christian <jason@primal.ucdavis.edu> wrote:
> Perl would close the old (and now empty) door into numbers.txt and open
> the new door. If the script ended right there, I wouldn't care if the
> file was open. What about if it went on for a while? Is there overhead
> associated with open-if-empty (or at least finished) files? Or is there
> some other reason to obsessively close things we have opened?
The overhead is pretty small. If you were leaking file handles, that would
be bad, but you would have to work pretty hard to do that in perl, what
with automatic closing upon reusing a file handle.
If the file is not a regular file but a pipe, then an explicit close is
more useful. It will allow you access to the return code and clean up
zombie processes.
> The spam-bots got my name a long time ago, so mangling my address would
> be like shutting the barn door after the horse had left...and I
> apparently like open doors.
Well I post from a valid address, but most spammers seem to ignore me.
Elijah
------
of course, lots of people seem to think it is not real
------------------------------
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 1813
**************************************