[11013] in Perl-Users-Digest
Perl-Users Digest, Issue: 4613 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jan 10 15:01:47 1999
Date: Sun, 10 Jan 99 12:00:26 -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 Sun, 10 Jan 1999 Volume: 8 Number: 4613
Today's topics:
Re: "Email this page to a friend" script <design@raincloud-studios.com>
Re: ActivePerl on Win95 <siusum@siusum.nospam.edu.th.cn>
Re: Adding a path to the @INC variable (Robin D.F. Silk)
Re: Beginner problem <jim@nospam.deadlock.com>
BUG: getpwnam()? - Perl shipped with RedHat5.2 <dumbkid@ix.netcom.com>
Re: CONCLUSIVE PROOF: Jesus *is* King of the Jews ! <joemama@roundtrip.net>
CONCLUSIVE PROOF: Jesus *is* King of the Jews ! ! ! <Matt@akooka.demon.co.uk>
Re: Example DBM locking in DB_File will corrupt your fi <dumbkid@ix.netcom.com>
Getting total records in a dbm file (Richard Zilavec)
Re: Getting total records in a dbm file (Tad McClellan)
Re: HTML:Parser (Martin Vorlaender)
Kind of Funny.. my first File::Path experience. <design@raincloud-studios.com>
Re: line-length limitations <rick.delaney@home.com>
Re: Newbie Question - Matt's wwwboard <uri@home.sysarch.com>
Re: Not printing if blank line found <z0f31@ttacs.ttu.edu>
Re: Perl 5.005.02 installation problem (Norman Branitsky)
Re: Perl Criticism <uri@home.sysarch.com>
Re: Perl Criticism (Bart Lateur)
Re: Perl Criticism <design@raincloud-studios.com>
Re: Perl Criticism (Bart Lateur)
Problem compiling Perl 5.004... ccboone@amber.indstate.edu
Re: PROBLEM with Win32::EventLog <z0f31@ttacs.ttu.edu>
Problems with DBM Files <amayc@gyro.mit.edu>
Req: HTMl parser script/module (Serial # 0)
Security <hypersdc@home.com>
Re: Security (Tad McClellan)
Re: subbing data into <IMG variable <ebohlman@netcom.com>
Re: uncuddled else? (Brian Greenfield)
Verify an email address (Richard Zilavec)
Re: Verify an email address (Tad McClellan)
Re: Verify an email address <rick.delaney@home.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 10 Jan 1999 18:18:50 GMT
From: "Charles R. Thompson" <design@raincloud-studios.com>
Subject: Re: "Email this page to a friend" script
Message-Id: <77aqua$10r@bgtnsc02.worldnet.att.net>
>>Use a form mail and just print the page in the message body.
Problem is
>>the recepient would have to have an HTML capable email reader.
Would be
>>better to just put the link to the page in the message body
instead. But
>>if you want to mail the whole page, I would think when the
user clicks
>>the 'mail it' button this is what would happen....
>
>Why not just parse the file and remove all unecessary
information (ie unwanted
>tags) before you send it out? After that, it's just a matter
of a little
>formatting ( ie separating valuable information and hyperlinks)
..
Why not? Cause I didn't think of it. :)
Yep.. that is another way to do it too.
CT
------------------------------
Date: Mon, 11 Jan 1999 02:51:30 +0800
From: "B-HIB" <siusum@siusum.nospam.edu.th.cn>
Subject: Re: ActivePerl on Win95
Message-Id: <77astq$bs3$1@imsp009a.netvigator.com>
i suggest you to install Personal Web Server on your computer, and test perl
on HTTP
that is more easy and somple on writing script in windows, and that is my
method.
Jason Boyd <6<g)s$e39 <3697BAC3.7DA17D9F@hotmail.com>...
>If anyone knows how I can get ActivePerl (509) to fuction properly on my
>Win95 system, could you please help me?
>
>I can open the perl.exe in Windows, but any scripts I run shut down as
>soon as they have displayed, meaning I can't see the results. When I try
>to open perl from DOS, it tells me "this program doesn't run in DOS
>mode." Yet the docs that come with the build claim it is for Win NT, 95
>and 98 systems.
>
>Any help is appreciated (even the name of another version of perl that
>IS built for Win95).
>
>Jason Boyd
------------------------------
Date: Sun, 10 Jan 99 19:32:54 GMT
From: silk@interlog.com (Robin D.F. Silk)
Subject: Re: Adding a path to the @INC variable
Message-Id: <silk.1266384414B@news.interlog.com>
I use the following with the "require" & "do" functions:
# add path of include files
push (@INC, '/usr/home/myname/perl/lib'); # Windows, UNIX etc.
require "myinclude.pl";
I have not used this with "use" so cannot claim it will work for that fn.
RS
In Article <m1d84pqrdr.fsf@halfdome.holdit.com>, merlyn@stonehenge.com
(Randal L. Schwartz) wrote:
>>>>>> "mike808" == mike808 <mike808@my-dejanews.com> writes:
>
>mike808> The 'use' is executed just like it was in its own BEGIN block.
>mike808> Try *2* begin blocks, one after the other, as in:
>
>mike808> BEGIN { $MyDir = '/path/to/some/dir'; }
>mike808> BEGIN { use lib "$MyDir/goo"; }
>
>No, the BEGIN on the second block is redundantly redundant.
>
>As yet another run on this, let's try this:
>
> use constant MyDir = '/path/to/some/dir';
> use lib MyDir."/goo";
>
>which works because everything happens at compiletime.
>
>print "Just another Perl hacker,"
>
>--
>Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
>Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
>Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger
merlyn@teleport.com)
>Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
>Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Robin Silk POTS: (416) 960-5289
278 Bloor St. E, Suite 1603 e-mail: silk@interlog.com
Toronto, Ontario, M4W 3M4
------------------------------
Date: Sun, 10 Jan 1999 18:54:16 +0000
From: Jim Rhodes <jim@nospam.deadlock.com>
Subject: Re: Beginner problem
Message-Id: <zz0CeGBYdPm2EwEY@deadlock.com>
In article <3695B07C.582BFDA2@netvigator.com>,
Alex <ex5316@netvigator.com> said:
>When I execute the script from my browser , only the error below appear
>:
>
>Internal Server Error
Have you made your script executable?
% chmod 755 scriptname
------------------------------
Date: Sun, 10 Jan 1999 12:02:13 -0600
From: DumbKid <dumbkid@ix.netcom.com>
Subject: BUG: getpwnam()? - Perl shipped with RedHat5.2
Message-Id: <3698EB25.EF914AC0@ix.netcom.com>
Hi all,
I have install RedHat5.2 in both Intel and Alpha machines.
I have no way to get the "realname" of the users in /etc/passwd
file using Perl5.005m4-1
However, using standard C can get the realname no problem. Is it
just me or there is a bug in perl package w/ redhat5.2
PERL
====
#!/usr/bin/perl
my(@pwent) = getpwnam("username");
print "@pwent \n";
Standard C
==========
#include <stdio.h>
#include <pwh.h>
#include <sys/types.h>
main()
{
struct passwd *pwent;
pwent = getpwnam("username");
printf("realname = (%s) \n", pwent->pw_gecos);
}
Any idea?? Both Intel and Alpha distributions have this problem.
Regards,
Tom
------------------------------
Date: Sun, 10 Jan 1999 10:36:03 -0800
From: Joe Mama <joemama@roundtrip.net>
Subject: Re: CONCLUSIVE PROOF: Jesus *is* King of the Jews ! ! !
Message-Id: <3698F313.782A@roundtrip.net>
FUCAUFLED wrote:
> "It sure seems fitting that your entire religion is based on
> worshiping a dead jew on a stick"
Really? And exactly what is your religion based on, the tenets of the
Dietrich Eckart's Thule Gesellschaft, which pagan dogma Adolph Hitler
espoused and based the entire foundation of the his empire upon?
I would guess that just as Hitler was alleged to have been the progeny
of the adulterous affair between a German maidservant and Jewish Baron
Rothschild, you yourself have Jewish blood somewhere in your ancestry..
But as most weak-minded disciples of anti-semitic propaganda are, you
no doubt have absolutely no idea of the nature or origin of the beliefs
that you have allowed yourself to be brainwashed to accept as truth..
- Ron Kuby
Ein Deutscher? Was haben sie nach der Juden gegen, or is German too
difficult for you understand, Ron?
--
-jm
---
To reply no spam, change "roundtrip" to "rarebird"
cuz for the spam it's gonna be a literal round trip..
------------------------------
Date: Sun, 10 Jan 1999 17:37:31 +0000
From: Matthew Wootton <Matt@akooka.demon.co.uk>
Subject: CONCLUSIVE PROOF: Jesus *is* King of the Jews ! ! !
Message-Id: <Pza1mcAbVOm2EwSF@akooka.demon.co.uk>
Thank god nobody's replying to this message. All those newsgroups would
be flooded with cross-posts.
--
Matthew Wootton
This sig file is very clever. It shows that I am a thoughtful and witty human
being.
http://www.akooka.demon.co.uk
http://members.xoom.com/monkeyenergy
------------------------------
Date: Sun, 10 Jan 1999 11:56:34 -0600
From: DumbKid <dumbkid@ix.netcom.com>
Subject: Re: Example DBM locking in DB_File will corrupt your file?
Message-Id: <3698E9D2.A3F64165@ix.netcom.com>
Steven Chan wrote:
>
> the example code is something like this,
> 1. tie %h
> 2. flock 1 or 2
> 3. flush
> 4. flock 8
> 5. untie
> 6. close
> Process A open the file and tie it,
> Process B open the file and tie it "with the same data as Process A",
> after Process A write, flush, and unlock,
> Process B use the old "TIED" data just before Process A wirte,
> therefore, the data wrote by Process A will be lost?
> am I right?
I have tried it, the second process B will not write anything.
And infact it cannot tie if Process A is writing.
------------------------------
Date: Sun, 10 Jan 1999 21:11:31 GMT
From: rzilavec@titan.tcn.net (Richard Zilavec)
Subject: Getting total records in a dbm file
Message-Id: <369915c1.148351953@199.166.4.3>
How do you get the total records in a DBM database without cycling
through each key:
dbmopen(%A, $DB, 0600) || die "$!\n";
foreach $key (keys %A) {
$count++;
}
dbmclose(%A)
Richard
------------------------------
Date: Sun, 10 Jan 1999 13:26:21 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Getting total records in a dbm file
Message-Id: <tsua77.l22.ln@magna.metronet.com>
Richard Zilavec (rzilavec@titan.tcn.net) wrote:
: How do you get the total records in a DBM database without cycling
: through each key:
: dbmopen(%A, $DB, 0600) || die "$!\n";
$records = keys %A;
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 10 Jan 1999 14:20:20 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: HTML:Parser
Message-Id: <3698a914.524144494f47414741@radiogaga.harz.de>
Steve (steveh_removethis@sinbad.net) wrote:
: I would like to run this file through HTML:Parser or HTML::Filter and get
: rid of ALL HTML markup.
:
: Can someone please give me the proper code to do this.. For some reason I
: just can not seem to get it to work..
As I answered to an identically titled question in comp.lang.perl.modules:
Create a derived class, and overload the methods you need (new, declaration,
start, end, text, comment), in your case probably new and text.
A simple example:
{
package myParser;
use HTML::Parser;
@myParser::ISA = qw(HTML::Parser);
sub new {
my $class = shift;
my $self = $class->SUPER::new;
$self->{myText} = '';
bless $self, $class;
}
sub text {
my ($self, $text) = @_;
$self->{myText} .= $text;
}
}
my $p = new myParser;
$p->parse_file('foo.html');
print $p->{myText};
cu,
Martin
--
| Martin Vorlaender | VMS & WNT programmer
VMS is today what | work: mv@pdv-systeme.de
Microsoft wants | http://www.pdv-systeme.de/users/martinv/
Windows NT 8.0 to be! | home: martin@radiogaga.harz.de
------------------------------
Date: 10 Jan 1999 19:11:38 GMT
From: "Charles R. Thompson" <design@raincloud-studios.com>
Subject: Kind of Funny.. my first File::Path experience.
Message-Id: <77au1a$45s@bgtnsc03.worldnet.att.net>
I've seen the benefits of modules mentioned in posting here, and
decided to use rmtree() in File::Path to replace about 20 lines
of code in one of my scripts. This was my absolute first time
with a module and I was already feeling a bit uneasy about it
because it was new.
It worked on the local server, so I uploaded the script via FTP
to my ISP and sent it a command to delete a subdirectory. After
doing that I went back to my FTP software to see if it was gone.
Not only was it gone... so was my site.. oh man... wait.. so is
the server! Oh my gosh... I'm going to jail.. I was *just
testing a script your honor*.. I swear!!
I quickly logged off in a panic and wondered if the wife and I
could pack and make Canada before sunset.
Then I realized... I had set my file filter on the FTP software
to some obscure thing where *nothing* was showing up.
Heh heh.. :)
CT
------------------------------
Date: Sun, 10 Jan 1999 17:24:17 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: line-length limitations
Message-Id: <3698E40F.A7E5DA6A@home.com>
[posted & mailed]
Fred Ramsing wrote:
>
> The following works.
>
> while (<INPUT>) {
> chomp $_;
> @line = split (/ |\t/ );
This should be faster and might even be noticeable for such a large
file:
@line = split /[ \t]/;
I leave the Benchmark'ing to you.
--
Rick Delaney
rick.delaney@shaw.wave.ca
------------------------------
Date: 10 Jan 1999 12:56:28 -0500
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: Newbie Question - Matt's wwwboard
Message-Id: <x7emp3j9kj.fsf@home.sysarch.com>
>>>>> "TS" == TRG Software <chatmaster@c-zone.net> writes:
TS> it yourself, because Matt's scripts are mainly meant for people to "get
TS> the job done and going". They leave a lot to be desires in many areas.
TS> However, to solve your immediate problem, again, I suggest you take a
TS> look through that site, through the FAQ's and help boards, because
TS> you're no going to get much help in a NG asking what's what with someone
TS> else's script that you're trying to "get to work". :-)
especially with matt's crap. the NG hates his stuff because of all the
bugs, halfassed designes etc. and for the fact that newbies keep using
them, complain to this group to fix them and matt never improves them
(as if he could). help me with matt is an FAQ with no answer!
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Sun, 10 Jan 1999 11:19:22 -0600
From: Larry Siron <z0f31@ttacs.ttu.edu>
Subject: Re: Not printing if blank line found
Message-Id: <3698E11A.72DD1756@ttacs.ttu.edu>
> print unless ($a[17]) eq "";
> The print unless does not stop the printing
> of the blank line probably because it is followed by print OUTPUT
> How do I exclude line 17 if it does not exist.
Well, are you sure you want $a[17] and not line #17?
Arrays start counting at 0, so if you read in a three-line file into
@array, you have:
$a[0] == (Line One)
$a[1] == (Line Two)
$a[2] == (Line Three)
It'll catch you off guard until you get in the habit.
(HTH..)
-Ryan
------------------------------
Date: Sat, 09 Jan 1999 20:25:43 GMT
From: norman@Cherniak.ON.CA (Norman Branitsky)
Subject: Re: Perl 5.005.02 installation problem
Message-Id: <3697ba4d.1598918@client.news.psi.ca>
I don't normally followup my own messages, but I'm really
disappointed.
It's a been a week since I posted this message and emailed it to
perlbug@perl.com.
Other than the automatic welcome to the newsgroup message,
there hasn't been a peep.
Isn't anyone using this version of PERL?
On Mon, 04 Jan 1999 04:06:57 GMT, norman@Cherniak.ON.CA (Norman
Branitsky) wrote:
>I'm trying to install Perl 5.005.02 on my UnixWare 2.1 server.
>"make" ran successfully.
>"make test" produced 95% success.
>
>
>Error from "make install":
>installperl: EXTERN.hhr.h not found at installperl line 585.
>
>
>Output of modconfig:
>Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration:
> Platform:
> osname=svr4, osvers=, archname=i386-svr4
> uname='unix_sv cgpc0 4.2mp 2.1 i386 x86at '
> hint=recommended, useposix=true, d_sigaction=define
> usethreads=undef useperlio=undef d_sfio=undef
> Compiler:
> cc='/bin/cc', optimize='-O', gccversion=
> cppflags='-I/usr/include -I/usr/ucbinclude -I/usr/local/include'
> ccflags ='-I/usr/include -I/usr/ucbinclude -I/usr/local/include'
> stdchar='unsigned char', d_stdstdio=define, usevfork=false
> intsize=4, longsize=4, ptrsize=4, doublesize=8
> d_longlong=undef, longlongsize=, d_longdbl=define, longdblsize=12
> alignbytes=4, usemymalloc=n, prototype=define
> Linker and Libraries:
> ld='/bin/cc', ldflags ='-L/usr/ccs/lib -L/usr/ucblib
>-L/usr/local/lib -L/usr/gnu/lib'
> libpth=/usr/local/lib /usr/gnu/lib /shlib /lib /usr/lib
>/usr/ccs/lib /usr/ucblib
> libs=-lsocket -lnsl -ldbm -ldl -lld -lm -lc -lcrypt -lucb -lx
> libc=/lib/libc.so.1.1, so=so, useshrplib=true, libperl=libperl.so
> Dynamic Linking:
> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
> cccdlflags='-KPIC', lddlflags='-G -L/usr/ccs/lib -L/usr/ucblib
>-L/usr/local/lib -L/usr/gnu/lib'
>
>Suggestions appreciated.
>(I've emailed this to perlbug@perl.com but haven't received a reply
>yet. Could be the holiday break ;-)
------------------------------
Date: 10 Jan 1999 12:51:42 -0500
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: Perl Criticism
Message-Id: <x7hftzj9sh.fsf@home.sysarch.com>
>>>>> "BL" == Bart Lateur <bart.lateur@skynet.be> writes:
BL> Uri Guttman wrote:
>> how do you access globals with isolate?
BL> One of the few things I like about AppleScript, is that ALL variables in
BL> a sub are local, unless you declare them exmplicitely as global.
BL> "global" makes an explicit window through the "isolate".
that is fine, but our dear lowestmind never mentioned how isolat would
work. and it is a lousy name too!
but i think i prefer declaring locals since you can document what they
mean to the sub in the sub. the inverse of declaring which globals you
use would be redundant with regard to comments and such.
hey, this was an intelligent set of comments in this thread. what
happened?
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Sun, 10 Jan 1999 18:00:53 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Perl Criticism
Message-Id: <3698eaba.5349640@news.skynet.be>
Uri Guttman wrote:
>hey, this was an intelligent set of comments in this thread. what
>happened?
Could it be that tmind had a point?.... Nah... ;-)
Bart.
------------------------------
Date: 10 Jan 1999 18:23:26 GMT
From: "Charles R. Thompson" <design@raincloud-studios.com>
Subject: Re: Perl Criticism
Message-Id: <77ar6u$2b6@bgtnsc02.worldnet.att.net>
>>Record? What record? It doesn't exist anymore. We left that
>>behind yesterday when this thread attributed to 75% of the
total
>>Internet traffic for Earth. The thread is now the equivalent
of
>>the virtual Blob, slowly oozing out into our newsreaders with
>>all the grace of a mudslide.
>
>What's its estimated contribution to global warming?
As long as the server fan doesn't give out, we should be okay.
CT
------------------------------
Date: Sun, 10 Jan 1999 19:04:10 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Perl Criticism
Message-Id: <3698f854.191578@news.skynet.be>
topmind@technologist.com wrote:
>My goal is not to find the obsure, un-resume-able language,
>but to promote a good common standard that does not have
>the stupidity of the past.
You've lost me, pal.
I think "I've been dabbling with CAML" would look better on a resume
than "I've been bashing Perl".
You cannot possibly expect to change the basics of Perl, and expect it
to be the same language. It wouldn't be Perl any more.The derivation
would be "one of those obscure languages" again.
Anyway, that's how *I* found Perl, Python and TCL, more than 5 years
ago. They weren't the "hot items" then. Funny how my preferences of that
time eventually made it into popularity...
Bart.
------------------------------
Date: Sun, 10 Jan 1999 17:14:18 GMT
From: ccboone@amber.indstate.edu
Subject: Problem compiling Perl 5.004...
Message-Id: <77an59$mfb$1@nnrp1.dejanews.com>
I am having difficulty compiling perl 5.004xx on a Solaris 2.6 machine. The
machine was upgraded from 2.5.1. The machine is also a sparc 20. I have
successfully compiled on a Ultra 10 running 2.6, but can not get the sparc 20
to compile it. I get a message about no memory model specified. I have never
had to specify a memory model before. Any ideas?? Please email me at
ccboone@amber.indstate.edu
Charles Boone
Unix System Admin -- Indiana State University
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Sun, 10 Jan 1999 11:09:54 -0600
From: Larry Siron <z0f31@ttacs.ttu.edu>
Subject: Re: PROBLEM with Win32::EventLog
Message-Id: <3698DEE2.EF4E46B9@ttacs.ttu.edu>
> $EventLog->Read($ReadFlags, $RecordOffset, %Event) || die $!;
> usage: Read(flags, RecordOffSet, hashref)
> Can anyone help me?
If I'm not mistaken (but that's not too improbable), but it looks like
you need
$EventLog->Read($ReadFlags, $RecordOffset, \%Event) || die $!;
^
instead. (Note backslash before %Event if there are font-widthical
problems)
&some_sub(%hash) will send all the key/value pairs in %hash to
&some_sub, while
&some_sub(\%hash) will send a "Reference" to the hash.. as in, it will
use the actual hash instead of a copy.. more or less.
-Ryan
------------------------------
Date: Sun, 10 Jan 1999 13:29:28 -0500
From: Amay Champaneria <amayc@gyro.mit.edu>
Subject: Problems with DBM Files
Message-Id: <3698F188.99F9E491@gyro.mit.edu>
I'm using Perl 5.004_04 built for alpha-dec_osf and I'm having trouble
with DBM files in CGI scripts. My problem is that every now and then I
lose about half of the data in a DBM file. I'm speculating that the
losses occur when a script is interrupted (when the user presses "stop"
on his browser). I'm using dbmopen and dbmclose to read and write the
DBM files. Has anyone else encountered this problem, and if so, what
was done to work around it?
Also, how should I lock a DBM file?
-Amay Champaneria
------------------------------
Date: Sun, 10 Jan 1999 18:48:13 GMT
From: j.bessels@wolverine.demon.nl (Serial # 0)
Subject: Req: HTMl parser script/module
Message-Id: <3698f18b.7151774@news.demon.nl>
When creating Interactive web-apps its often teamwork between a
graphic designer which creates fancy HTML pages and poor souls called
programmers (me) which puts something usefull on the screen, like the
next multiplechoice question of a quiz (all questions are located in a
text file), an on the fly generated GIF for weather prognoses etc
etc.... Putting all the HTML code in the Perl program is a nightmare
for the graphic designer. Hence HTML templates (created by the
designer) are used with TAGS inside them. A Perl script called via
CGI calculates a HTML code for a table or reads the next question....
Inside the Perl script the HTML template is read (which is ouputted to
the calling client after parsing) and the TAGS inside are used to
place a table in the HTML code or displaying the next question in a
table (by variable substitution) which is created by the designer....
So far I've got a simple function called ParseHTML which can replace
variables in a HTML template. What I'm looking for is a more advanced
parser which can for example deal with $if then else constructs in
HTMl templates, have while loops etc. In the past at another firm I've
used a C++ function from an inhouse library which did just that. I
expected to find quite a lot of parsers for Perl to tackle is problem
but I can't find them. I've looked a couple of times at the Web and
CPAN but to no avail. Have found HTML::Parse which is IMO is not hat
I'm looking for.
If something can provide me with such a parser I would be gratefull or
if you have come up with an even better solution for this raterh
elementary problem I would like to hear from you. I can't imaging I'm
the only guy struggling with this problem.
Except for replying in this group an Email to jan@planet.nl (work) is
very much appreciated.
Jan Bessels
============
------------------------------
Date: Sun, 10 Jan 1999 18:51:37 GMT
From: SDC <hypersdc@home.com>
Subject: Security
Message-Id: <36988692.44BBA583@home.com>
Hello all,
I need to get some feedback from those of you that are well versed in
e-commerce. What type of security issues if any, do I need to be concerned
about when it comes to CGI scripts and payment proceessing? We're looking into
using SSL and CyberCash. Let me know if there is any other info required for
such a question. Right now I'm just doing the research.
Thanks in advance,
SDC
------------------------------
Date: Sun, 10 Jan 1999 13:22:01 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Security
Message-Id: <pkua77.l22.ln@magna.metronet.com>
SDC (hypersdc@home.com) wrote:
: I need to get some feedback from those of you that are well versed in
: e-commerce. What type of security issues if any, do I need to be concerned
: about when it comes to CGI scripts and payment proceessing? We're looking into
: using SSL and CyberCash. Let me know if there is any other info required for
: such a question. Right now I'm just doing the research.
This is the Perl newsgroup.
Please post Perl questions here.
Please post other questions other places.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 10 Jan 1999 17:38:52 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: subbing data into <IMG variable
Message-Id: <ebohlmanF5CuCt.G4p@netcom.com>
A Melton <melton@diagdata.com> wrote:
: What kind of script to write to automatically substitute
: these three numbers into the values below after "content"
: <IMG
: SRC="http://www.mydata.com/cgi-bin/mydata/bcmill/barcode.gif?symbol=3&content=sub_1---------->
perlfaq4 has some sample code for this sort of thing; after reading it,
you might also go over to CPAN and check out the various template modules
in the text-processing section.
------------------------------
Date: Sun, 10 Jan 1999 17:06:29 GMT
From: not-for-replies@dtseven.demon.co.uk (Brian Greenfield)
Subject: Re: uncuddled else?
Message-Id: <915987990.17448.0.nnrp-10.9e98f345@news.demon.co.uk>
On 10 Jan 1999 14:17:43 GMT, "Allan M. Due" <due@murray.fordham.edu>
wrote:
>Brian Greenfield wrote in message
><915976154.14151.0.nnrp-12.9e98f345@news.demon.co.uk>...
>
>|What's an "uncuddled else"?
>
>My understanding:
>
>if (condition) {
> code
>}
>else {
> code
>}
>
>HTH
Yes, thanks. I guess Larry and I will have to agree to differ then:)
--
You're reading this in a newsgroup because that's where I posted it.
That's where I'd like to read your reply too. DON'T MAIL AND POST!
But, if you really want to reply by email, my reply-to *IS* valid ;)
------------------------------
Date: Sun, 10 Jan 1999 21:03:26 GMT
From: rzilavec@titan.tcn.net (Richard Zilavec)
Subject: Verify an email address
Message-Id: <369914f6.148149139@199.166.4.3>
I need a way to verify that an email address is the correct format,
this is what I came up with but it doesn't completely work:
$ii =~ /^.+\@.+[(.)](com|net|edu|gov|ca|org)/
Richard
------------------------------
Date: Sun, 10 Jan 1999 13:24:53 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Verify an email address
Message-Id: <5qua77.l22.ln@magna.metronet.com>
Richard Zilavec (rzilavec@titan.tcn.net) wrote:
: I need a way to verify that an email address is the correct format,
: this is what I came up with but it doesn't completely work:
: $ii =~ /^.+\@.+[(.)](com|net|edu|gov|ca|org)/
^^^^^^^^^^^^^^^^^^^^^^
You seem to be missing some possibilities there...
Or is North America the "whole world" for your application?
Perl FAQ, part 9:
"How do I check a valid mail address?"
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 10 Jan 1999 19:51:53 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Verify an email address
Message-Id: <369906A9.9C41FC4F@home.com>
[posted & mailed]
Richard Zilavec wrote:
>
> I need a way to verify that an email address is the correct format,
Can't be done. See perlfaq9, "How do I check a valid mail address?"
--
Rick Delaney
rick.delaney@shaw.wave.ca
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 4613
**************************************