[15977] in Perl-Users-Digest
Perl-Users Digest, Issue: 3389 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 16 11:05:28 2000
Date: Fri, 16 Jun 2000 08:05:14 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <961167914-v9-i3389@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 16 Jun 2000 Volume: 9 Number: 3389
Today's topics:
Re: "Fuzzy" matching <guy@firstcreative.com>
Re: "Fuzzy" matching <guy@firstcreative.com>
Re: [REGEXP] Matching list of comma-separated ID's <bochmann-usenet0600@gmx.net>
Re: [REGEXP] Matching list of comma-separated ID's (Rafael Garcia-Suarez)
Re: A Computer Programmers Profile <care227@attglobal.net>
Re: A Computer Programmers Profile <care227@attglobal.net>
Re: A Computer Programmers Profile <shawnball@uswest.net>
Re: can't get CGI.pm to autoEscape ? <tony_curtis32@yahoo.com>
Re: CPAN, Windows and AS Perl v5.6 (Steve A. Taylor)
Re: Crazy enough that it might just work... <care227@attglobal.net>
Re: Crazy enough that it might just work... <flavell@mail.cern.ch>
Re: Determining Dates <abe@ztreet.demon.nl>
Re: did anybody try uploading files to sever? <care227@attglobal.net>
Editor question <se97hs@dmu.ac.uk>
Re: Editor question <rootbeer@redcat.com>
Re: End delimiter line <Peter.Dintelmann@dresdner-bank.com>
Re: First day with Perl <Peter.Dintelmann@dresdner-bank.com>
Re: flock() and blocking lock? <rootbeer@redcat.com>
Re: GIMP on G4 Mac (Abigail)
HTML by e-mail with Perl Problem (uses Net::SMTP) joel_ricker@my-deja.com
Re: List all hosts of a subdomain with Net::DNS? (Michael Fuhr)
Re: Login and passwords <jboes@eoexchange.com>
Re: looking for a 'diff' like comparison routine? <dwilgaREMOVE@mtholyoke.edu>
Re: Name/Value pair for a hyperlink? <care227@attglobal.net>
Re: Name/Value pair for a hyperlink? <care227@attglobal.net>
Order Transfer Protocol (OTP) <remove.this.talexb@tabsoft.on.ca>
Re: Order Transfer Protocol (OTP) <rootbeer@redcat.com>
Re: Perl->Gnuplot <sattlerc@cig.mot.com>
Re: Perl-Compiler for Windows? <Peter.Dintelmann@dresdner-bank.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 16 Jun 2000 14:27:48 +0100
From: "Guy Fraser" <guy@firstcreative.com>
Subject: Re: "Fuzzy" matching
Message-Id: <8ida0l$laq$1@plutonium.compulink.co.uk>
I tried many of the search engines but they only pointed me to the modules
I'd already found :o(
Guy
> Have you tried searching on Yahoo, Google, and other search engines?
------------------------------
Date: Fri, 16 Jun 2000 14:28:43 +0100
From: "Guy Fraser" <guy@firstcreative.com>
Subject: Re: "Fuzzy" matching
Message-Id: <8ida2b$ldh$1@plutonium.compulink.co.uk>
Hi.
Is this group archived anywhere as I don't have your earlier posts in my
message base :o(
Regards
Guy
> If you can't use String::Approx, you should be able to get the same
> information from Algorithm::Diff, which is pure Perl. From a quick
> reading of the String::Approx docs, it appears that the "number of
> edits" between two strings equals the length of the longer string
> minus the length of the LCS.
>
> I'd like to note that I've found a different metric to be useful -
> namely a "match rate" defined as the square of the length of the LCS
> divided by the lengths of the two strings. YMMV.
------------------------------
Date: 16 Jun 2000 14:20:00 GMT
From: Henryk Bochmann <bochmann-usenet0600@gmx.net>
Subject: Re: [REGEXP] Matching list of comma-separated ID's
Message-Id: <8idd2g$4ie05$1@fu-berlin.de>
Rafael Garcia-Suarez <garcia_suarez@hotmail.com> wrote:
>>I need users to input a string which will consist of one or more part
>>ID's with two decimal digits (eg. 1.03 or 2.01 or 12.03). The first
>>number stands for the type of the part, the two latter digits for its
>>version. Users are supposed to separate the numbers by comma+space. The
>>final string should look like '1.03' or '2.01, 12.02, 3.03, 8.04',
>>depending on the number of parts required and should not contain a
>>final comma, but may contain a final space.
>>
>>Can anybody help me with a regex that would test for the correct input?
> This regexp will verify that $string matches your specification:
> $string =~ /\d+\.\d\d(, \d+\.\d\d)* ?/
> but it won't extract any useful information from it.
> Look also at the split function to extract the fields from your
> input string.
Rafael,
I tried the following:
#! /usr/bin/perl
@tests = ('1.03',
'1.03, 2.04',
'2.03 3.04',
'3.03 3.04',
'3.03,3.04',
'3.03, 3.04, 4.04 ',
'3.03 3.04 4.04');
foreach $field (@tests) {
if ($field =~ /\d+\.\d\d(, \d+\.\d\d)* ?/) {
print "-$field- is OK.\n";
} else {
print "-$field- is FALSE.\n";
}
}
It seems to come out OK for all tests, while it should only allow
'1.03, 2.04' and '3.03, 3.04, 4.04 '.
Puzzled,
Henryk
--
Henryk Bochmann, M.D. | bochmann@rcs.urz.tu-dresden.de
| University Clinic @ Technical University Dresden
Tel: +49 351 458-4813 | Institute of Clin.Chemistry & Laboratory Medicine
Fax: +49 351 458-4332 | 01307 Dresden, Fetscherstr. 74, Germany
------------------------------
Date: Fri, 16 Jun 2000 14:48:30 GMT
From: garcia_suarez@hotmail.com (Rafael Garcia-Suarez)
Subject: Re: [REGEXP] Matching list of comma-separated ID's
Message-Id: <slrn8kkfpb.k0a.garcia_suarez@rafael.kazibao.net>
Henryk Bochmann wrote in comp.lang.perl.misc:
>Rafael Garcia-Suarez <garcia_suarez@hotmail.com> wrote:
>>>I need users to input a string which will consist of one or more part
>>>ID's with two decimal digits (eg. 1.03 or 2.01 or 12.03). The first
>>>number stands for the type of the part, the two latter digits for its
>>>version. Users are supposed to separate the numbers by comma+space. The
>>>final string should look like '1.03' or '2.01, 12.02, 3.03, 8.04',
>>>depending on the number of parts required and should not contain a
>>>final comma, but may contain a final space.
>>>
>>>Can anybody help me with a regex that would test for the correct input?
>
>> This regexp will verify that $string matches your specification:
>> $string =~ /\d+\.\d\d(, \d+\.\d\d)* ?/
>> but it won't extract any useful information from it.
>> Look also at the split function to extract the fields from your
>> input string.
>
>Rafael,
>
>I tried the following:
>
>#! /usr/bin/perl
>
>@tests = ('1.03',
> '1.03, 2.04',
> '2.03 3.04',
> '3.03 3.04',
> '3.03,3.04',
> '3.03, 3.04, 4.04 ',
> '3.03 3.04 4.04');
>
>foreach $field (@tests) {
> if ($field =~ /\d+\.\d\d(, \d+\.\d\d)* ?/) {
> print "-$field- is OK.\n";
> } else {
> print "-$field- is FALSE.\n";
> }
>}
>
>It seems to come out OK for all tests, while it should only allow
>'1.03, 2.04' and '3.03, 3.04, 4.04 '.
Ok. This one will work (I suppose):
if ($field =~ /^\d+\.\d\d(, \d+\.\d\d)+ ?$/) ...
Note the ^ and $ to anchor the regexp at the beginning and at the end
of the string. Note that I've replaced the '*' by a '+' so at least two
numerical fields are required.
By the way, you should read something on regular expressions. The perlre
manpage, for example.
------------------------------
Date: Fri, 16 Jun 2000 09:53:27 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: A Computer Programmers Profile
Message-Id: <394A3157.E1E55B9B@attglobal.net>
Ferk Da Jerk wrote:
>
> I'd like to see you try to kill the children. It seems these days the
> children are out numbering the adults, the killers are the children, and the
> children are more stronger than the adults.
^^^^^^^^^^^^^
And oh the grammer!
------------------------------
Date: Fri, 16 Jun 2000 09:54:16 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: A Computer Programmers Profile
Message-Id: <394A3188.D7A88378@attglobal.net>
Bart Lateur wrote:
>
> Ferk Da Jerk wrote:
>
> >I'm sorry I was so rude.
>
> Is this your dad or your mom speaking?
>
Had to be the dad.. the mom would have made him correct his
usage of "more stronger" as well... hehe
------------------------------
Date: Fri, 16 Jun 2000 09:49:17 -0700
From: "Ferk Da Jerk" <shawnball@uswest.net>
Subject: Re: A Computer Programmers Profile
Message-Id: <USq25.221$uE5.3178@news.uswest.net>
Bart Lateur <bart.lateur@skynet.be> wrote in message
news:394aecf2.2453334@news.skynet.be...
> Ferk Da Jerk wrote:
>
> >I'm sorry I was so rude.
>
> Is this your dad or your mom speaking?
>
> ;-)
>
> --
> Bart.
It was me. My mom doesn't know how to get on the Internet and my dad is
dead.
------------------------------
Date: 16 Jun 2000 08:27:40 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: can't get CGI.pm to autoEscape ?
Message-Id: <87u2etwyb7.fsf@limey.hpcc.uh.edu>
>> On Fri, 16 Jun 2000 12:02:05 +0200,
>> "Alan J. Flavell" <flavell@mail.cern.ch> said:
> On 15 Jun 2000, Tony Curtis wrote:
>> print a({href => $url}, 'click me!'), "\n";
>>
>> I can't get CGI not to munge the HTML, which means the
>> link comes out with the query string as:
>>
>> ?a=1&b=2
> In the HREF? That's exactly what it _should_ be.
> See, for example, the discussion at
> http://ppewww.ph.gla.ac.uk/~flavell/www/formgetbyurl.html
> There were problems with earlier versions of CGI.pm due
> to confusion between what was a URI and what was the
> appropriate HREF or SRC attribute value. It still may
> not be entirely transparent, but unless you show more
> detail of your working, I'm having a hard time to put my
> finger on just where it's going wrong in your scenario.
Ah, OK. Obviously a fairly long time away from CGI stuff
has warped my brain. The issue of entities not terminated
by ';' never occurred to me (which is strange, because
usually I'm fairly quick to spot counter-examples :-).
Thanks for the pointers.
I noticed that at least in netscape, both the protected
and un-protected links in your example appeared the same
in the browser's "this is the link you're over" message
area. That was initially confusing until your text
provided sudden enlightenment.
It makes sense now I've read your explanation.
Live and learn I guess.
--
"Trying is the first step towards failure"
Homer Simpson
------------------------------
Date: Fri, 16 Jun 2000 13:55:33 GMT
From: an400@freenet.carleton.ca (Steve A. Taylor)
Subject: Re: CPAN, Windows and AS Perl v5.6
Message-Id: <394a3169.11762009@news.ncf.carleton.ca>
On Tue, 13 Jun 2000 01:48:44 GMT, doran@NOSPAMaltx.net (Doran) wrote:
>I have ActiveState perl v5.6 (build613) on my Win98 machine.
>
>I'd *really* like to use the CPAN module to retrieve and install
>modules when they're not available via PPM.
>
>I've gone through my Config.pm file (in \perl\lib\CPAN) and put in the
>values I think are correct (see below) but I still haven't been able
>to install *any* modules. For example, when I try to install
>MP3::Info, I get this:
>
>-------------------------------
>begin CPAN output
>-------------------------------
>cpan> install MP3::Info
>Running make for C/CN/CNANDOR/MP3-Info-0.80.tar.gz
>Checksum for
>\.cpan\sources\authors\id\C\CN\CNANDOR\MP3-Info-0.80.tar.gz ok
>MP3-Info-0.80/eg/mp3tag.PL
>MP3-Info-0.80/eg/mp3tocddb.PL
>MP3-Info-0.80/Info.pm
>MP3-Info-0.80/lib/MPEG/MP3Info.pm
>MP3-Info-0.80/Makefile.PL
>MP3-Info-0.80/MANIFEST
>MP3-Info-0.80/README
>MP3-Info-0.80/test.pl
>MP3-Info-0.80/test1.mp3
>MP3-Info-0.80/test2.mp3
>Removing previously used \.cpan\build\MP3-Info-0.80\.
>
> CPAN.pm: Going to build C/CN/CNANDOR/MP3-Info-0.80.tar.gz
>
>Checking if your kit is complete...
>Looks good
>Bad command or file name
>Bad command or file name
>Unable to find a perl 5 (by these names: C:\Perl\bin\Perl.exe miniperl
>perl perl5 perl5.00503, in these dirs: Z:. X:. W:. C:\BIN C:\DJGPP\BIN
>C:\NOVELL\CLIENT32 C:\WINDOWS C:\WINDOWS\COMMAND C:\PERL\BIN\
>C:\WINDOWS\SYSTEM C:\NCFTP C:\PROGRAMFILES\MTS
>C:\PROGRA~1\SYMANTEC\PCANYW~1\ C:\Perl\bin)
>Writing Makefile for MP3::Info
>Makefile:651: *** missing separator. Stop.
> c:\djgpp\bin\make -- NOT OK
>Running make test
> Oops, make had returned bad status
>Running make install
> Oops, make had returned bad status
>
>cpan>
>
>-------------------------------
>end of CPAN output
>-------------------------------
>
>I suspect that those "Bad command or file name" errors can't be a good
>thing, but I'm not sure what's failing at that point. Plus there's
>that nasty "missing separator" message. I should note that I *do* have
>perl installed in the C:\Perl\bin directory as Perl.exe, so I'm also
>not quite sure why I'm getting the "Unable to find a perl5..." error.
>
>I have read README.win32.html and that mentions a problem with
>command.com in Win95. Is that the problem? Do I need a different
>command interpreter? That readme seems to be for an older version of
>perl, so I'm not even sure if the things it talks about still pertain
>in v5.6.
>
>Finally, just FYI, perl runs fine on my machine (well, fine for a
>Windows machine) , so I know it's installed and in my path and such.
>
>Here's my Config.pm with the values I entered:
>
>C:\Perl\lib\CPAN>type Config.pm
>
># This is CPAN.pm's systemwide configuration file. This file provides
># defaults for users, and the values can be changed in a per-user
># configuration file. The user-config file is being looked for as
># ~/.cpan/CPAN/MyConfig.pm.
>
>$CPAN::Config = {
> 'build_cache' => q[10],
> 'build_dir' => q[\.cpan\build\.],
> 'cpan_home' => q[\.cpan\.],
> 'ftp' => q[C:\WINDOWS\ftp.exe],
> 'ftp_proxy' => q[],
> 'getcwd' => q[cwd],
> 'gzip' => q[c:\bin\gzip],
> 'http_proxy' => q[],
> 'inactivity_timeout' => q[0],
> 'index_expire' => q[1],
> 'inhibit_startup_message' => q[0],
> 'keep_source_where' => q[\.cpan\sources\.],
> 'lynx' => q[c:\lynx\lynx],
> 'make' => q[c:\djgpp\bin\make],
> 'make_arg' => q[],
> 'make_install_arg' => q[],
> 'makepl_arg' => q[],
> 'ncftpget' => q[c:\ncftp\ncftpget],
> 'no_proxy' => q[],
> 'pager' => q[C:\WINDOWS\COMMAND\more.com],
> 'prerequisites_policy' => q[follow],
> 'scan_cache' => q[atstart],
> 'shell' => q[c:\command.com],
> 'tar' => q[c:\bin\tar],
> 'unzip' => q[c:\bin\gunzip],
> 'urllist' => [],
> 'wait_list' => [q[wait://ls6.informatik.uni-dortmund.de:1404]],
>};
>1;
>__END__
>
>C:\Perl\lib\CPAN>
>
>Let me know if there's some web page or FAQ or something that I've
>missed that I need to read. I suspect I'm not the first person to ask
>this question, but I haven't found any answers (that solve the
>problem) in my searches at deja and elsewhere.
>
>Thanks for any insight, help or direction you may offer.
>Doran...
>
>
>
I traced that"Bad command or file name" to ExtUtils\MM_Win32.pm
It's a portability issue of system versus backtick. I changed line 163
# $val = `$abs -e "require $ver;" 2>&1`; #old
$val = system('$abs -e "require $ver;" 2>&1'); # new
(and perl finds itself)
Now a later error arises.
------------------------------
Date: Fri, 16 Jun 2000 10:06:59 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Crazy enough that it might just work...
Message-Id: <394A3483.F3D26D09@attglobal.net>
Henry wrote:
>
> If I were to scrutinise your posting history, I would probably find you
> crucifying newbies in 75% of them. Your point?
>
I don't want to sound like a cheerleader, but Abigail is legendary
for being helpfull and wise.
------------------------------
Date: Fri, 16 Jun 2000 16:29:28 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Crazy enough that it might just work...
Message-Id: <Pine.GHP.4.21.0006161628300.8722-100000@hpplus03.cern.ch>
On Fri, 16 Jun 2000, Drew Simonis wrote:
> I don't want to sound like a cheerleader, but Abigail is legendary
> for being helpfull and wise.
Yes, and cryptic.
;-)
--
"A piece of shh...eer spin" - bbc political commentator
------------------------------
Date: Fri, 16 Jun 2000 16:09:10 +0200
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: Determining Dates
Message-Id: <qs9kksoqtj5s7664sfk5gv84rscm2lk77i@4ax.com>
On Thu, 15 Jun 2000 20:56:51 GMT, reedjd@bitsmart.com wrote:
> I'm attempting to write a Perl program that can determine if it is the
> last weekday of the month.
>
> Obviously I can use localtime(time) to figure out what day of the month
> it is and if it's a weekday or not, but is there any way in Perl to
> determine the total number of days a month taking leap years into
> account?
This is one:
#!/usr/bin/perl -w
use strict;
sub last_mday($$) { #$month: 0..11; $year: CCYY
my ($month, $year) = @_;
( qw(31 0 31 30 31 30 31 31 30 31 30 31) )[$month] ||
28 + (($year % 100 && !($year % 4))|| !($year % 400));
}
my($m, $y) = (1, 2000);
printf "Last day in %02d (%d): %d\n", $m+1, $y, last_mday($m, $y)
__END__
--
Good luck,
Abe
------------------------------
Date: Fri, 16 Jun 2000 10:36:15 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: did anybody try uploading files to sever?
Message-Id: <394A3B5F.A8C56B7C@attglobal.net>
Lucas Tsoi wrote:
>
> Hi sorry I aked it before, but i need to ask it again as it is urgent.
I answered this question last time with some specific followups.
Foremost among those was a request for error log output.
IIRC, you mentioned that you _could_ delete the files when logged
as root, suggesting an obvious permission problem between your
normal logon and files owned by a different UID and GID.
I further suggested that the webserver/cgi process should be
able to delete any file that it created, and the chance for
permission problems was nil there. If there is an error,
then by all means please post the actual error text.
HTH
------------------------------
Date: Fri, 16 Jun 2000 14:59:59 +0100
From: Haris Siakalis <se97hs@dmu.ac.uk>
Subject: Editor question
Message-Id: <394A32DF.AEDA9E1F@dmu.ac.uk>
Hello,
I don't want to bore you with the same questions.
I don't want to start long disussions of whats best.
I know of editors like synedit,editplus,codemagic etc etc
that support perl. What i am after and i cannot find is
an editor that will break my perl program into subroutines
or be configurable to do so, like Source Insight does for
c/c++ programes.Its got to be on windows. Can you help please?
Thanks
------------------------------
Date: Fri, 16 Jun 2000 07:58:21 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Editor question
Message-Id: <Pine.GSO.4.10.10006160754290.5301-100000@user2.teleport.com>
On Fri, 16 Jun 2000, Haris Siakalis wrote:
> What i am after and i cannot find is
> an editor that will break my perl program into subroutines
pico can do that. :-)
Oh, you want it done automatically? Do the resulting subroutines have to
run correctly? :-)
Unless you want something different than you're saying, there's no useful
tool that does what you want. If you want your program broken into
subroutines, write it that way. There's no program out there that will do
your job for you.
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Fri, 16 Jun 2000 15:33:38 +0200
From: "Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com>
Subject: Re: End delimiter line
Message-Id: <8idab8$3sn3@intranews.dresdnerbank.de>
Hi,
Jean-Pascal Laux schrieb in Nachricht <3949D5CA.1D60CB9E@easynet.fr>...
>I want to write text lines in a file using print fonction but I also
>want that the en delimiter is line-feed (with no CR).
simply print the characters you like (be careful
about \n - see perlport).
>How to do it ?
the perlvar page shows that there is a variable $\
'output record separator' which appends to print().
Just have a look...
Peter Dintelmann
------------------------------
Date: Fri, 16 Jun 2000 15:46:52 +0200
From: "Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com>
Subject: Re: First day with Perl
Message-Id: <8idb42$3sv6@intranews.dresdnerbank.de>
Hi,
STF schrieb in Nachricht <394A0875.7BF130CF@pinuts.de>...
>Can i include Perl-code in HTML-files as easily as PHP-code?
>And how do i do that?
works with PerlScript on IIS (NT). ActiveState will help you ;-)
>Problem is, i want to write some datas in a mysql database ... these
>datas are content of input fields of an html-file.
>How do i do this with perl?
use a CGI together with the DBI module. Have a look
at *any* cgi guide...
But you shouldn't really do those things on your
first day with perl.
Peter Dintelmann
------------------------------
Date: Fri, 16 Jun 2000 07:42:03 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: flock() and blocking lock?
Message-Id: <Pine.GSO.4.10.10006160741100.5301-100000@user2.teleport.com>
On Fri, 16 Jun 2000, Marc Haber wrote:
> if( open FH, "< $FHNAME" )
> {
> print "trying to hget lock on $FHNAME\n";
> unless( flock( FH, LOCK_EX ) )
On most systems I've seen, you can't get an exclusive lock if you don't
have write permission. Try a shared lock if you're only reading. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 16 Jun 2000 10:58:06 EDT
From: abigail@delanet.com (Abigail)
Subject: Re: GIMP on G4 Mac
Message-Id: <slrn8kkh66.kp1.abigail@alexandra.delanet.com>
Robert Gasiorowski (gasior@snet.net) wrote on MMCDLXXXI September
MCMXCIII in <URL:news:394A2F90.B7EEC699@snet.net>:
.. I'm trying to install GIMP on G4 running LinuxPPC 2000, but when I run
.. configure
.. I get message: can't recognize the platform configure manually
.. Any ideas?
And your Perl question is.... ?
Abigail
--
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))
------------------------------
Date: Fri, 16 Jun 2000 14:54:06 GMT
From: joel_ricker@my-deja.com
Subject: HTML by e-mail with Perl Problem (uses Net::SMTP)
Message-Id: <8idf24$p8m$1@nnrp1.deja.com>
A newbie perl person here. Been learning perl for oh.. two days now..
and I'm getting a little ahead of myself by trying to cobble together a
script for sending out e-mails in HTML format. I found a script in the
archives of libwww-perl (which btw, is this still up? My e-mail to the
subscription address bounced). I edited it a little but probably
messed it up as well. Could someone give me a hand with it?
Script follows:
uses Net::Smtp;
$smtp = Net::SMTP->new('smtp.Hidden.net');
$smtp->mail($ENV{USER});
$smtp->to('my address which I want to keep hiddem from spam');
$smtp->data();
$smtp->datasend("Subject: An E-mail\r\n");
$smtp->datasend("Content-Type: multipart/mixed;
boundary=\"------------5ADEC09B1959CE2F1D69C2F9\n");
$smtp->datasend("To: Joel Ricker\r");
$smtp->datasend("\n");
$smtp->datasend("--------------5ADEC09B1959CE2F1D69C2F9\n");
$smtp->datasend("Content-Type: text/html; charset=us-ascii;
name=\"\testrun.htm\"\n");
$smtp->datasend("Content-Transfer-Encoding: 7bit\n");
$smtp->datasend("\n");
open (HTML,"testrun.htm");
while (<HTML>)
{ $smtp->datasend($_);
}
close (HTML);
$smtp->dataend();
$smtp->quit;
Thanks In Advance
Joel
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 16 Jun 2000 08:37:29 -0600
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: List all hosts of a subdomain with Net::DNS?
Message-Id: <8ide39$i2k@flatland.dimensional.com>
Reiner Buehl <Reiner_Buehl@hp.com> writes:
> I would like to list all hosts in a given subdomain. Using nslookup I can do
> it using the "ls -t A" command of nslookup. Is there a similar command for
> Net::DNS?
Listing all records in a zone is called a "zone transfer". Take a look
at the "axfr" method in the Net::DNS::Resolver manual page. There's an
online version here:
http://www.fuhr.org/~mfuhr/perldns/Resolver.html#axfr
If you just want A records, you'll have to filter for them yourself -- the
axfr method returns all records (SOA, NS, MX, etc.). If you don't get any
records at all, then the nameserver may not allow zone transfers from your
host.
Hope this helps.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
------------------------------
Date: Fri, 16 Jun 2000 09:30:02 -0400
From: Jeff Boes <jboes@eoexchange.com>
Subject: Re: Login and passwords
Message-Id: <394a2e30$0$1500$44a10c7e@news.net-link.net>
vivekvp wrote:
>
> Hello,
>
> I want to create a web page that has logins and passwords for multiple
> users.
>
> Sort of like a web based email (hotmail) - that has login and passwords.
> This would grant access to an account.
>
> It would have to allow some one to create a unique login and password -
> an allow access to that specific account. also send email to the users
> if they lose their password.
>
> It is to be web based - but the back end process to be done in perl.
>
> Anyone aware of a free script that does this - or how to do this?
>
Many, many free scripts are available at www.cgi-resources.com and
www.perlarchive.com, among other places.
--
Jeff Boes |perl -e 'print map(substr(
|jboes@eoexhange.com
Sr. Software Engineer|" acehjklnoprstu,\n",$i+=$_,1),(5,|616-381-9889
ext 27
Change Technology |9,-2,1,-13,1,7,1,4,-9,-1,8,-11,10,|616-381-4823
fax
EoExchange, Inc. |-7,8,-4,-7,4,-3,1,4,-3,8,4,1));'
|www.eoexchange.com
------------------------------
Date: Fri, 16 Jun 2000 14:56:12 GMT
From: Dan Wilga <dwilgaREMOVE@mtholyoke.edu>
Subject: Re: looking for a 'diff' like comparison routine?
Message-Id: <dwilgaREMOVE-7742F5.10561716062000@news.mtholyoke.edu>
In article <akj25.257$vH4.4988@nsw.nnrp.telstra.net>, "Robert Chalmers"
<robert@chalmers.com.au> wrote:
> Hi folks,
> I need a script that will compare two text files (a) and (b) - rows of text
> up to 80 chars each row, and print a list of the rows that appear in the
> first file (a), that do not appear in the second file (b)
>
> I think its something like stepping through the first file a rwo at a time,
> and searching for each row in the second file. If it doesn't find it, print
> it out and skip to the next.
Abigail's answer to the poster is a good one. But on a related track, I
actually converted the full-blown diff program to a Perl module. However,
because of the way the original source was written, the way I had to do it is
far from pretty (meaning it may not be portable, and I wouldn't want to submit
it to CPAN). Nonetheless, it does work on my machine running Linux. So if
anyone wants the source, let me know.
While I was at it, I added options to do a character-by-character comparison
(rather than line-by-line), and to produce output in HTML format, with <UL>
tags surrounding what was added and <STRIKE> tags around what was removed.
Dan Wilga dwilgaREMOVE@mtholyoke.edu
** Remove the REMOVE in my address address to reply reply **
------------------------------
Date: Fri, 16 Jun 2000 10:13:53 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Name/Value pair for a hyperlink?
Message-Id: <394A3621.1557CB3E@attglobal.net>
"Alan J. Flavell" wrote:
>
> I find I know which spec to consult when there's
> something I need, and can rattle off RFC2616 or iso-8859-7 with the
> rest of them.
>
You mean there are _others_?
------------------------------
Date: Fri, 16 Jun 2000 10:16:12 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Name/Value pair for a hyperlink?
Message-Id: <394A36AC.B80F6A67@attglobal.net>
Tony Curtis wrote:
>
>
> A question specifically addressing CGI.pm may be on-topic
> but you'd need to be explicit about the issues.
>
> It's a difficult one I agree.
I'd also suggest the OP read comp.lang.perl.modules and adhere to
the rule of thumb: when the question is specifically covered by
another group, it shouldn't be posted to .misc.
------------------------------
Date: Fri, 16 Jun 2000 13:56:45 GMT
From: T. Alex Beamish <remove.this.talexb@tabsoft.on.ca>
Subject: Order Transfer Protocol (OTP)
Message-Id: <qeckks0gfmkjfrhvic2i7ba6isf6csld5q@4ax.com>
I've checked CPAN and can't find anything for the Order Transfer
Protocol. The documentation I have says:
The Visual Ticket Order Transfer Protocol (OTP) is a universal
standard for transferring orders between Visual Ticket stations,
Internet web sites, and other foreign systems using a simple Flat File
(ASCII Delimited) file format. The OTP standard provides a super set
of ASCII delimited fields to capture all of the necessary information
for Florist, Mail Order, and other Service related customer orders,
regardless of the specific platform that orders are generated on.
I'm just trying to avoid re-inventing the wheel. If there's a perl
module out there that handles any of this protocol, please let me
know. Thanks!
------------------------------
Date: Fri, 16 Jun 2000 07:54:12 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Order Transfer Protocol (OTP)
Message-Id: <Pine.GSO.4.10.10006160753200.5301-100000@user2.teleport.com>
On Fri, 16 Jun 2000, T. Alex Beamish wrote:
> I've checked CPAN and can't find anything for the Order Transfer
> Protocol.
> I'm just trying to avoid re-inventing the wheel.
Good - but it sounds like, in this case, you get to be the inventor!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Fri, 16 Jun 2000 08:08:54 -0500
From: "Chris Sattler" <sattlerc@cig.mot.com>
Subject: Re: Perl->Gnuplot
Message-Id: <8id8t8$rn51@nntp.cig.mot.com>
I wan interfacing to gnuplot in a different way. I dumped all my data to a
file, put the gnuplot commands in a separate file and then called gnuplot
with a system(".....gnuplot"); command. One thing I had to do to get the
plots to stay up was to put a "pause -1" command at the end of the gnuplot
commands. This will cause gnuplot to leave the window up until a character
is typed inside the window that ran the perl script.
"Rob Zwartjes" <rzwartje@rob.home.nl> wrote in message
news:slrn8kihce.lb0.rzwartje@rob.home.nl...
> Hello Perlers,
>
> Probably this type of question is already been posted here in one or the
> other way but I couldn't find it. So here it is again. It doesn't have to
be
> a solution a hint where to look is OK to. Maybe I learn something from it.
> What I want is to plot some data collected with perl in Gnuplot
> and I thought it
> should go like this :
> $data='plot [-6:6] sin(x)';
> open (GPLOT,"|gnuplot")
> print GPLOT $data;
> close GPLOT;
> The only thing I see is a flash of a window with a figure and then it is
> gone.
> What I want is that the window stays on screen as long as I want. Am I
> looking in the wright direction ? Or, and that probably is the case here,
I
> am overlooking some thing.
>
> hope you can help me,
>
> Rob.
------------------------------
Date: Fri, 16 Jun 2000 15:35:59 +0200
From: "Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com>
Subject: Re: Perl-Compiler for Windows?
Message-Id: <8idafl$3st6@intranews.dresdnerbank.de>
Hi,
Christian Meisl schrieb in Nachricht ...
>Is there a possibility to compile a perl script for windows, in order
>to run it on a machine where perl is _not_ installed?
there is a tool called perl2exe from demobuilder
(it is www.dynamicstate.com now I think).
Peter Dintelmann
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 3389
**************************************