[6768] in Perl-Users-Digest
Perl-Users Digest, Issue: 393 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Apr 29 18:27:17 1997
Date: Tue, 29 Apr 97 15:00:19 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 29 Apr 1997 Volume: 8 Number: 393
Today's topics:
BITMAPS & Backgrounds <mshoaib@nortel.com>
Re: CGI scripts (Paula Chase)
compiling perl5.003 under BSDI 3.0 <mark@23.com>
CORBA mappings & stuff <wsfaplau@sprynet.com>
Die problem (Bill Blohm)
Elementary file opening question (al chase)
Re: Elementary file opening question (Eric Bohlman)
Executing htpasswd from within Perl <garyn@foodtrak.com>
Extracting all links from HTML? David_D._Jones@hud.gov
Re: Ftp. nntp, http how to access the protocols with a (A. Deckers)
How to print HTML ? <pat@noc.home>
Re: Is there a YACC module? <sfink@cs.berkeley.edu>
Multi line matching problem. Should be simple?!? <houde@fox.cisti.nrc.ca>
Re: Notice to antispammers (A. Deckers)
Re: Notice to antispammers <rsi@lucent.com>
Re: Notice to antispammers <eryq@enteract.com>
Re: Perl auto-replier (rga)
Re: Perl auto-replier (Quentin Fennessy)
Re: pre-RFD: comp.lang.perl.{data-structure,inter-proce (A. Deckers)
q: copy dir structure, files, and chmod (Scott Card)
Re: regexp cribsheet <oboyle@purdue.edu>
script producing HTML to interact with netscape <josephn@mail.mcoe.k12.ca.us>
Re: Syntax checking? (Chris Schleicher)
unexec'd Perl program dumps core (Unknown persons)
Re: Windows 95 and FTP (Eric Bohlman)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 28 Apr 1997 22:50:46 -0500
From: Mohammed Shoaib <mshoaib@nortel.com>
Subject: BITMAPS & Backgrounds
Message-Id: <33657016.7BB@nortel.com>
Hi All:
Is there a way in tk that I can use say a gif or bmp file as my
background to frame or canvas.
I would like to create a chart that has the company logo in the
backgroung, The chart ofcourse is automated where bunch of items/tags
are generated and plotted against an (X,Y) scale on-top of the gif file.
I hope I did not confuse anyone
Thanks in advance
/MrAs
------------------------------
Date: Tue, 29 Apr 1997 16:40:41 -0400
From: paula@irnoise.com (Paula Chase)
Subject: Re: CGI scripts
Message-Id: <paula-2904971640420001@mfs-2-101.port.shore.net>
> : > We use best.com in California, and they let us use whatever CGI's we
> ^^^^^
> : > want. And their prices are very reasonable.
>
> : <sarcasim>
> : Hm. Wasn't aware of more than one CGI. I guess I figured that the NCSA
> ^^^^^^^^^^^^^^^^^
> : implementation from a few years ago was good enough.
> : </sarcasim>
I was speaking colloquially, using "CGI" as a shortened form of "CGI
script." I see the inaccuracy of my language, but stand behind it as
valid slang. ;-))
Paula
------------------------------
Date: Tue, 29 Apr 1997 13:11:18 -0700
From: Mark Swartz <mark@23.com>
Subject: compiling perl5.003 under BSDI 3.0
Message-Id: <33665589.41C67EA6@23.com>
I've been trying all morning to get perl5.003 compiled with gdbm
support on a box running BSDI 3.0. From reading a thousand FAQs I've
gathered that there are well known problems with BSDI's take on
dynamic linking, so I've tried to do everything statically, and gotten
myself into trouble doing that. Now I'm doing the configuration like
this:
sh configure -Dcc=gcc -Uusedl
...to tell make to ignore dynamic loading. Everything's cool until
I get to the Socket extension (which I'm assuming I need for network
applications... is this correct?), and then I get this:
gcc -L/usr/X11/lib -L/usr/local/lib -o perl perlmain.o libperl.a
lib/auto/DynaLoader/DynaLoader.a lib/auto/DB_File/DB_File.a
lib/auto/Fcntl/Fcntl.a lib/auto/FileHandle/FileHandle.a
lib/auto/GDBM_File/GDBM_File.a lib/auto/NDBM_File/NDBM_File.a
lib/auto/POSIX/POSIX.a lib/auto/SDBM_File/SDBM_File.a
lib/auto/Safe/Safe.a lib/auto/Socket/Socket.a `cat ext.libs` -lgdbm -ldl
-lm -lc
dbmopen.o: Definition of symbol _dbm_open (multiply defined)
dbmdelete.o: Definition of symbol _dbm_delete (multiply defined)
dbmfetch.o: Definition of symbol _dbm_fetch (multiply defined)
dbmstore.o: Definition of symbol _dbm_store (multiply defined)
dbmseq.o: Definition of symbol _dbm_firstkey (multiply defined)
dbmseq.o: Definition of symbol _dbm_nextkey (multiply defined)
dbmclose.o: Definition of symbol _dbm_close (multiply defined)
ndbm.o: Definition of symbol _dbm_firstkey (multiply defined)
ndbm.o: Definition of symbol _dbm_fetch (multiply defined)
ndbm.o: Definition of symbol _dbm_open (multiply defined)
ndbm.o: Definition of symbol _dbm_close (multiply defined)
ndbm.o: Definition of symbol _dbm_delete (multiply defined)
ndbm.o: Definition of symbol _dbm_nextkey (multiply defined)
ndbm.o: Definition of symbol _dbm_store (multiply defined)
*** Error code 1
Stop.
Feh! Does anyone know how to get around this? Or where I can find the
sob story of someone else using perl5 on BSDI?
Mark
------------------------------
Date: Tue, 29 Apr 1997 15:06:56 -0400
From: Bob Kryger <wsfaplau@sprynet.com>
Subject: CORBA mappings & stuff
Message-Id: <336646D0.62D0@sprynet.com>
Has anyone given any thought to CORBA with regards to Perl?
--
Bob Kryger
mailto:wsfaplau@sprynet.com
Web Site: Soon to come
*************************** Disclaimer ******************************
* *
* The above statements are my opinions and do not represent the *
* position(s) of my employer, family, state, national government, *
* religious or professional affiliates, or the almighty it's *
* ever-flowing-self. If you care to take me more seriously than *
* I do myself, then congratulations, for you are a greater being *
* than I. *
* *
*********************************************************************
Work Info:
---------- (914) 345-1100 - Main
Senior Member of Technical Staff (914) 789-0333 - Direct
NextWave Wireless Inc. (914) 345-1140 - FAX
3 Skyline Drive
Hawthorne, NY 10532 mailto:bkryger@nextwavetel.com
http://www.nextwavetel.com
------------------------------
Date: 29 Apr 1997 20:51:25 GMT
From: bblohm@boi.hp.com (Bill Blohm)
Subject: Die problem
Message-Id: <5k5n0d$2ju19@hpbs1500.boi.hp.com>
I'm running Perl 5.001m. I wrote a small (very!) Perl program
to simply replace LF with LF/CR on each line of the input file,
and to save the original as <filename>.old. The original program,
listed below, works fine:
#!/usr/local/bin/perl -pi.old
s/\n/\n\r/g;
Once I had this working, I handed it off to the user that requested
the program. A few days later he came back, admitted he'd forgotten
how to use it, and asked how to use it. I explained how, and decided
to put a usage clue in there for anyone else that wanted to use it,
(or this user if he forgot again). That's when my problems started.
I added the die line as shown below, and then found out several
things:
#!/usr/local/bin/perl -pi.old
die "Usage: cradd <filename>\n" if @ARGV < 1;
s/\n/\n\r/g;
If it matters, there's a blank line between each line in the real
file.
My problem was that with the die line, the above would essentially
hang. That is, it wouldn't come back to the prompt, wouldn't run.
I found out that if I remove the -pi.old, then it would properly
prompt the user with how to use it, and quit if he didn't provide
a file name. BUT it wouldn't execute the last line if he did
provide a file name as a parameter. If I remove just the i.old,
leaving the -p, then it just hangs as when I'd first added the
die line. If I just remove the p, leaving -i.old, then again it
does nothing but does return. No changes to the file, no file with
the .old extension.
I've been to http://www.perl.com/perl and gone thru the FAQs, I've
got the O'Reilly "Programming perl" book (Purple Camel?) and have
gone thru that. I've been digging around in the man pages. I admit
it. I'm missing something somewhere in all this documentation.
What's going wrong here? What am I missing?
Bill B.
------------------------------
Date: Tue, 29 Apr 1997 15:59:13 -0700 (PDT)
From: alchase@iadfw.net (al chase)
Subject: Elementary file opening question
Message-Id: <82CAAC43AE695781.CEBF87D0C9FEA6EF.8FCCD416866501C1@library-proxy.airnews.net>
If I run the following as http://localhost/cgi-bin/test.pl it produces
only the header and by viewing document source it is evident that
verything between the open and close statements has been skipped.
However, if I run it in dos as
perl test.pl > test.htm
and then run test.htm from netscape gold 3.0, it displays the contents
f the file as expected. I am using WebSite and the script is a
simplification of one on p 84 of "cgi primer plus for windows"
What am I doing wrong?
Thanks in advance,
Al
alchase@airmail.net
#!/cgi-shl/perl
print "Content-type: text/html\n\n";
# Print the HTML header
print <<HTMLHEADER;
<HTML>
<HEAD>
<TITLE>
Test
</TITLE>
</HEAD>
<BODY>
<H1>A Dynamic Table</H1>
HTMLHEADER
# Print the file
open(IN_FILE,"<test.txt");
while(<IN_FILE>) {
print $_;
}
close(IN_FILE);
print "\n";
# Print the HTML footer
print <<HTMLFOOTER;
</BODY>
</HTML>
HTMLFOOTER
#End
------------------------------
Date: Tue, 29 Apr 1997 21:42:21 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Elementary file opening question
Message-Id: <ebohlmanE9F5ML.1Lr@netcom.com>
al chase (alchase@iadfw.net) wrote:
: If I run the following as http://localhost/cgi-bin/test.pl it produces
: only the header and by viewing document source it is evident that
: verything between the open and close statements has been skipped.
[snip]
: # Print the file
: open(IN_FILE,"<test.txt");
You're not checking whether your attempt to open the file succeeded. If
it didn't, it will produce exactly the symptom you described. Change
that to:
open(IN_FILE,"<test.txt") or die "Can't open input file: $!\n";
and check your error log after running your script. Probably your server
doesn't have permission to open the file, but why speculate?
------------------------------
Date: Tue, 29 Apr 1997 14:20:15 -0700
From: Gary Nichols <garyn@foodtrak.com>
Subject: Executing htpasswd from within Perl
Message-Id: <3366660F.50126741@foodtrak.com>
Currently, to update my webserver's Apache password file (.passwordfile)
I am manually executing:
htpasswd .passwordfile username
(password)
(password again for verification)
I'd like to be able to do this thru a perl script that I could feed
variables from a web-based form.
My problem is: how in Perl would I execute htpasswd on a username and
feed it the password twice?
Any help would be greatly appreciated!
---------------------------------------------------------------------------
Gary Nichols garyn@doitnow.com
---------------------------------------------------------------------------
------------------------------
Date: Tue, 29 Apr 1997 16:01:49 -0600
From: David_D._Jones@hud.gov
To: David_D._Jones@hud.gov
Subject: Extracting all links from HTML?
Message-Id: <862340986.11689@dejanews.com>
I'm trying to to extract extract all links to *.html, *.gif, and *.jpg
file on my website. I'm using libwww v5.08 to parse the files and
extract the links. The folowing code works examing all the files and
extracting all the links. The only problem is I also want all the path
names to be resolved into absolute paths. I'm stuck...I'm not sure
exactly how to go about doing this, any suggestion?
-David
use HTML::TreeBuilder;
$h = new HTML::TreeBuilder;
foreach $file (@files) {
$h->parse_file($file);
for (@{ $h->extract_links(qw(A IMG)) }) {
($link, $linkelem) = @$_;
print "<$link>\n";
}
}
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: 29 Apr 1997 19:51:20 GMT
From: I-hate-cyber-promo@man.ac.uk (A. Deckers)
Subject: Re: Ftp. nntp, http how to access the protocols with a perl script
Message-Id: <slrn5mck9g.ba3.I-hate-cyber-promo@nessie.mcc.ac.uk>
In comp.lang.perl,
comp.lang.perl.misc,
eduard.laera@munich.netsurf.de wrote:
comp.lang.perl is a bogus group; please don't post to it.
> Hi PerGurus,
>
>
>i want to write a per script,
Per_l_, please. :-)
>with which I could access news, ftp, or http server,
>and send and recieve data, e.g. for testing.
There are many Perl modules available to do this. You will find them on
CPAN <URL:http://www.perl.com/CPAN/modules/>.
>Please reply via email because i4m not always
>checking this site.
This is not a site, it's a newsgroup, and given that you're asking people
to asnwer your questions, you should accord them the courtesy of reading
the group to find their answer.
Cheers,
Alain
--
Perl information: <URL:http://www.perl.com/perl/>
Perl FAQ: <URL:http://www.perl.com/perl/faq/>
Perl archive: <URL:http://www.perl.com/CPAN/>
------------------------------
Date: Tue, 29 Apr 1997 12:33:13 -0700
From: Pat Darisme <pat@noc.home>
Subject: How to print HTML ?
Message-Id: <33664CF9.5D59@noc.home>
Pat Darisme wrote:
>
> Is there an easy way to script hardcopies of html files ?
>
> I have some critical information that needs to be accessible at all
> times, especially in the event that the web server was to go down.
> So I want to script a cronjob that prints the files weekly.
>
> That was easy when the files were text but when they are html, how
> do I make the html and tables print out like readable text without
> doing feeling like a subroutine pointing and clicking away 500 files ?
>
> Any help would be appreciated.
>
> Thanks...
>
> --
> _____________________
> Pat W. Darisme
> pat@home.net
>
> @Home Network
> www.home.net
> www.kicksbutt.com
> www.whoanellie.com
> _____________________
>
> |
> ,@ __|-.
> ,_~o/ \/ | Through the router, off the switch,
> |/ | down the cable, nothing but net.
> / > |
> ' ` | The @Home slam dunk
> | www.home.net
> _____________________|
--
_____________________
Pat W. Darisme @Home Network Operations (800)872-3595
pat@noc.home.net Pager - page.pat@home.net (888)300-1606
Network Analyst
@Home Network
_____________________
|
,@ __|-.
,_~o/ \/ | Through the router, off the switch,
|/ | down the cable, nothing but net.
/ > |
' ` | The @Home slam dunk
| www.home.net
_____________________|
------------------------------
Date: Tue, 29 Apr 1997 13:40:40 -0700
From: Steve Fink <sfink@cs.berkeley.edu>
Subject: Re: Is there a YACC module?
Message-Id: <33665CC8.369C@cs.berkeley.edu>
> > CPAN/authors/id/JAKE/perl5-byacc-patches-0.5.tar.gz
>
> And which BTW doesn't need -P as far as I can see.
No, I think it still does. I installed the patch and this is one line
from the test output:
#ifndef YYDEBUG
But judging from the readme, this is a very cool patch. Thanks Jake! The
output of the version I hacked up is nearly identical to the C output,
as nearly as possible. I had ideas for making it more useful for perl5
than the raw output was, but didn't have time to implement them.
Just glancing at the code, it looks like the only real change to the
action scanning was making it handle perl comments (correct me if I'm
wrong.) I had problems with clashes between perl notation and yacc
notation. And the C-based scanning doesn't work on many common perl
constructs, for example:
s/\}//;
wouldn't work (but should on mine). @x = qw({ } }) would not work on
either system.
I also added symbol interpolation inside strings -- eg, this would work:
expr : expr '+' expr { $$ = "$1+$2"; }
And last, his is based on a 1992 version of byacc, mine on a 1996
version of bison (but no, I don't know what the differences are.)
So unfortunately, it looks like you can't have both at once now. Use
mine if you need better scanning or more recent bison features. Use
Jake's otherwise, since its output is much nicer. Or really do it right,
and take the two and integrate them. Rewrite the scanning, while you're
at it -- it's written as one big glob of C scanning code, rather than
being generated by flex (for example). Which means it's a pain to add a
new language to it, and it's brittle too.
Maybe someday I'll get around to merging the two myself. Unless Jake or
somebody else would prefer to do it... :)
------------------------------
Date: Tue, 29 Apr 1997 15:59:05 -0400
From: Pascal Houde <houde@fox.cisti.nrc.ca>
Subject: Multi line matching problem. Should be simple?!?
Message-Id: <33665309.41A550C7@fox.cisti.nrc.ca>
Here's a small example of what I want to do:
$var="some\nthing"
$var =~ s/something/blablabla/;
print $var; # which would print blablabla
But this doesn't work even if I specify $*=1 and/or $/ =""
I don't want to do something like:
$var =~ s/some\nthing/blablabla/; or $var =~ s/so.*ing/blablabla/s;
because I never know where the word is cut by a new line and
I want an accurate search. (so forget about the "." trick and /s)
I'm using Perl 5.003
Any help appreciated!
please email me your reply.
(houde@fox.cisti.nrc.ca)
------------------------------
Date: 29 Apr 1997 19:54:50 GMT
From: I-hate-cyber-promo@man.ac.uk (A. Deckers)
Subject: Re: Notice to antispammers
Message-Id: <slrn5mckg2.ba3.I-hate-cyber-promo@nessie.mcc.ac.uk>
In comp.lang.perl.misc,
Paul Ramsey <togtog@writeme.com> wrote:
>I for one, think Tom is an asshole. [...]
I for one, think you've just found the short route into many killfiles. :-)
*plonk*
Cheers,
Alain
--
Perl information: <URL:http://www.perl.com/perl/>
Perl FAQ: <URL:http://www.perl.com/perl/faq/>
Perl archive: <URL:http://www.perl.com/CPAN/>
------------------------------
Date: 29 Apr 1997 16:25:32 -0400
From: Rajappa Iyer <rsi@lucent.com>
Subject: Re: Notice to antispammers
Message-Id: <xnyohaxh8zn.fsf@placebo.hr.lucent.com>
I-hate-cyber-promo@man.ac.uk (A. Deckers) writes:
> In comp.lang.perl.misc,
> Paul Ramsey <togtog@writeme.com> wrote:
>
> >I for one, think Tom is an asshole. [...]
>
> I for one, think you've just found the short route into many killfiles. :-)
Maybe... OTOH, it does not reflect too well on Tom either that he did
not respond to single substantial point in any of the replies to his
post.
--
Rajappa Iyer <rsi@lucent.com> #include <std_disclaimer.h>
They also surf who only stand on the waves.
------------------------------
Date: Tue, 29 Apr 1997 15:41:00 -0500
From: Eryq <eryq@enteract.com>
Subject: Re: Notice to antispammers
Message-Id: <33665CDC.64494209@enteract.com>
Rajappa Iyer wrote:
> On the other
> hand, I fail to see why you feel compelled to mail your response. I
> mean, the whole point of the newsgroup is so that all participants can
> discuss relevant topics. Why did people suddenly *have* to send mail?
> Whatever happened to just following up on the newsgroup?
Hmmm... good question... if anyone knows the answer, please
email it to me: I don't get a chance to read this newsgroup
very often.
:-)
(That, ah say, that was a JOKE, son. HUMOR, that is...)
--
___ _ _ _ _ ___ _ Eryq (eryq@enteract.com)
/ _ \| '_| | | |/ _ ' / Hughes STX, NASA/Goddard Space Flight Cntr.
| __/| | | |_| | |_| | http://www.enteract.com/~eryq
\___||_| \__, |\__, |___/\ Visit STREETWISE, Chicago's newspaper by/
|___/ |______/ of the homeless: http://www.streetwise.org
------------------------------
Date: Tue, 29 Apr 1997 19:37:25 GMT
From: rga@io.com (rga)
Subject: Re: Perl auto-replier
Message-Id: <33664d06.7144906@news.io.com>
Ronald.J.Kimball@dartmouth.edu (Chipmunk) wrote:
>
>Here's a great idea for a perl script.
Sure caused a great heat in the news group
I thought of ... hmmm .. maybe a group
called <comp.lang.perl.newbie> ..
But, then who would answer the questions ?
<;-)>
------------------------------
Date: 29 Apr 1997 21:32:59 GMT
From: quentin@hendrix.amd.com (Quentin Fennessy)
Subject: Re: Perl auto-replier
Message-Id: <5k5peb$c22$1@amdint2.amd.com>
In article <5k58aa$bg1$2@csnews.cs.colorado.edu>,
Tom Christiansen <tchrist@mox.perl.com> wrote:
>
>When >90% of anything you read is dreck, you tire of suffering
>fools gladly. This newsgroup is no longer worth wasting time
>reading, or contributing to.
>
>It got to be too much for him. When something's too much for him,
>he bails. I, on the other hand, got pissy and tried to stick with it.
>I was wrong, twice, but I'm through with those mistakes. I go now to
>join Larry in that great Perl heaven far removed from Usenet.
I am sorry to hear that, Tom. I have read news for 12 years and this
refrain is painful to hear again. If it helps, I class your work with
posts from folks like:
Henry Spencer
Chris Torek
Doug Gwyn
Larry Wall
Dennis Ritchie
Strange - I don't see posts from many of these people anymore.
I suppose even carborundum wears down sooner or later.
Your posts have been always been very helpful, and you have done
more for the Perl community than anyone but Larry.
Go in peace,
--
Quentin Fennessy AMD, Austin Texas
------------------------------
Date: Tue, 29 Apr 1997 15:41:07 -0600
From: I-hate-cyber-promo@man.ac.uk (A. Deckers)
Subject: Re: pre-RFD: comp.lang.perl.{data-structure,inter-process,porters,regex}
Message-Id: <862345580.14858@dejanews.com>
In article <336630EF.62FB2A5B@absyss.fr>,
Douglas Seay <seay@absyss.fr> wrote:
>
>
> Evan Kirshenbaum wrote:
> > How about if we create clp.cgi and clp.www, but we make them
> > robomoderated groups, where the moderation policy is to reject all
> > postings with a note pointing to ciwa.cgi?
> >
> > They'll be a relatively low-volume groups, so nobody should mind, and
> > it might cut down on the traffic here.
> >
> > [Tongue only slightly in cheek.]
>
> Aye!
>
> Is it possible to make one usenet group an alias of another? Just make
> this new c.l.p.www be a "symbolic reference" to c.i.w.a.cgi might do the
> trick. I've never heard of such a thing, so I doubt if it is already in
> a RFC.
The same effect would be achieved by making the submission address for
the new group the same as that for comp.infosystems.www.authoring.cgi.
But as I've said before, IMO that would never get past the news.groups
crowd and would most likely be rejected by tale. I'm sure Russ Allbery
will correct me if I'm wrong.
{...]
> More food for thought: how many "clueless web programmers" will
> cross-post to both the new group and good ol' misc? Or even worse, send
> duplicate copies? If this percentage is high, we're just wasting our
> time dreaming about stopping these boneheads.
One way to eliminate the problem would be to forbid x-posting between
clp.misc and the new groups. I can see the advantages, but wonder if this
is a bit drastic. I'm all ears if anyone has opinions they would like to
voice about this issue.
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Tue, 29 Apr 1997 19:45:40 GMT
From: ils@pipcom.com (Scott Card)
Subject: q: copy dir structure, files, and chmod
Message-Id: <33664fb5.5946949@news.pipcom.com>
I have created (using cgi) a directory structure with html files
throughout it. The files and sub-directories are under a directory off
the root (/special). Is it possible to:
1) copy all the subdirectories under /special up one level creating
directories where necessary (if they don't already exist)
2) replace any existing files at the root if new ones have been
created under /special
3) chmod on all files and directories to 644
can this be done as one or as seperate commands?
Thanks in advance.
------------------------------
Date: 29 Apr 1997 20:48:50 GMT
From: Todd O'Boyle <oboyle@purdue.edu>
To: neiled@enteract.com
Subject: Re: regexp cribsheet
Message-Id: <5k5mri$6op@ector.cs.purdue.edu>
[ courtesy copy cc'ed to neiled@enteract.com and posted ]
David Alan Black <dblack@icarus.shu.edu> contributed:
> "Neil Edmondson" <neiled@enteract.com> writes:
> >shirt sleeve, with LOTS of worked examples (I don't need lot's of words -
> >my mind is pretty good at pattern matching ;), Seems like examples are the
> >only way I can learn these days.
> It sounds like what you need are exercises, not examples. I would
> tend to advise against a cut-and-paste approach to regular expressions,
> unless you know exactly what the regex is doing and exactly why it's
> right for your needs.
I found this refreshingly interesting. It is a java game based on a
regex class (for java), but it is very applicable to perl. And the page is
comedic to boot! (check out the garbage collection pun)
http://www.win.net/~stevesoft/pat/htm/ReGameIntro.html
> Jeffrey Friedl's "Mastering Regular Expressions" is a magisterial
> work on the subject, but it's addressed to people who actually want
> to learn about regexes in depth. I can't think of any way to
> reconcile your defeatism with any eventual ability to write
> accurate and robust code.
This book will be much more fun _and_ interesting, should you master this
game. :)
-Todd
--
Todd O'Boyle - Programmer, Perl Hacker, BMX Rider, etc. -
URL: <a href="http://www.cs.purdue.edu/homes/oboyle/"> My Homepage! </a>
PGP: finger oboyle@cs.purdue.edu
EMAIL: oboyle@purdue.edu
------------------------------
Date: 29 Apr 1997 20:13:06 GMT
From: "joseph norris" <josephn@mail.mcoe.k12.ca.us>
Subject: script producing HTML to interact with netscape
Message-Id: <01bc5546$cc179320$274d04c7@josephn.mcoe.k12.ca.us>
I have written several applications using perl to produce HTML under
Explorer.
Now I have a project that requires Netscape upload feature. The problem is:
None of my background colors showup. My background stays grey. Also no
background gifs either. Under explorer, everything functions just fine.
Any suggestions would be most appreciated. joseph.
--
Joseph Norris
email : josephn@mail.mcoe.k12.ca.us
Mendocino County Office Of Education
------------------------------
Date: 29 Apr 1997 13:38:59 -0700
From: chrissch@cs.uoregon.edu (Chris Schleicher)
Subject: Re: Syntax checking?
Message-Id: <5k5m93$90q@psychotix.cs.uoregon.edu>
In article <5k5h03$snh@nr1.toronto.istar.net>,
TCM Online <tcm@wcl.on.ca> wrote:
>I've started off on a new project from the ground up and now get a
>run error stating I'm missing a right bracket... is there any good
>freeware syntax checkers that will find this for me?
I'd suggest starting with
perl -wc helloWorld.pl
where -w enables many useful warnings and -c checks syntax. You should
also probably look into the 'strict' and 'diagnostics' pragmas which
will further help you avoid shooting yourself in the foot. Check out
the fine documentation that comes with perl for details.
HTH,
--Chris
--
Chris Schleicher Office: 541/346-3998
Univ of Oregon CIS GTF email: chrissch@cs.uoregon.edu
URL: http://www.cs.uoregon.edu/~chrissch/
------------------------------
Date: 29 Apr 1997 21:29:08 GMT
From: nobody@idiom.com (Unknown persons)
Subject: unexec'd Perl program dumps core
Message-Id: <pyenbz8i1g.fsf.1@cambridge.simoco.com>
The following message is a courtesy copy of an article
that has been posted as well.
This is a bug report for perl
from tim.wilson@cambridge.simoco.comm [remove final m],
generated with the help of perlbug 1.13 running under perl 5.003.
I have compiled perl with unexelf.c from emacs 19.34.1.
After calling dump, the resulting executables work fine most of the time,
but on the large Perl program (a compiler, about 40000 SLOC) whose
start-up time I wish to reduce,
1. firstly the program runs fine for some time
2. then Perl prints the message
Corrupt malloc ptr 0x4a9 at 0x117b800
3. then dumps core.
I do not have a small example -- my small examples all work fine :-(
Any hints, patches, or other help welcomed!
Tim
[Note: remove final 'm' from my Reply-To address to make it valid.]
----------------------------------------------------------------------
Site configuration information for perl 5.003:
Configured by ukcwitd at Thu Apr 24 09:12:17 BST 1997.
Summary of my perl5 (5.0 patchlevel 3 subversion 0) configuration:
Platform:
osname=solaris, osver=2.4, archname=sun4-solaris
uname='sunos serv10 5.4 generic_101945-44 sun4m sparc '
hint=previous, useposix=true, d_sigaction=define
Compiler:
cc='gcc', optimize='-O -g', gccversion=2.7.2
cppflags='-DDEBUGGING -DUNEXEC'
ccflags ='-DDEBUGGING -DUNEXEC'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
voidflags=15, castflags=0, d_casti32=define, d_castneg=define
intsize=4, alignbytes=8, usemymalloc=y, randbits=15
Linker and Libraries:
ld='gcc', ldflags =''
libpth=/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
libc=/lib/libc.so, so=so
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=, ccdlflags=' '
cccdlflags='-fpic', lddlflags='-G'
------------------------------
Date: Tue, 29 Apr 1997 21:18:50 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Windows 95 and FTP
Message-Id: <ebohlmanE9F4JF.In@netcom.com>
Joe Lempkowski (joey@Sun.COM) wrote:
: Does anyone have a pointer on how to use PERL to download files via
: ftp on a Windows 95 platform?
Go over to <URL:http://www.perl.com/CPAN/> and check out the Net::FTP module.
------------------------------
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 393
*************************************