[8548] in Perl-Users-Digest
Perl-Users Digest, Issue: 2164 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 23 15:18:08 1998
Date: Mon, 23 Mar 98 12:00:37 -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 Mon, 23 Mar 1998 Volume: 8 Number: 2164
Today's topics:
- Perl Script to Find & Display Matches.. - <James@cydaps.nospam.co.uk>
[Q] Making Money with PERL/CGI?? (Wef)
Re: [Q] Making Money with PERL/CGI?? (brian d foy)
Re: Backreference problem fscholz@wv.mentorg.com
CGI.pm nmcfadye@mae.carleton.ca
Re: Challenge your pr...distance calculation <franzen@pmel.noaa.gov>
Re: checking for undefined elements in an array (Mike Stok)
Re: compiling perl (Kevin Reid)
Re: connecting to a port like netcat does (Jason Bodnar)
Re: Creating a unique id number? (Andrew M. Langmead)
Re: Creating a unique id number? <merlyn@stonehenge.com>
Going Rates for PERL Programming??? (Wef)
Re: Going Rates for PERL Programming??? (brian d foy)
help me, I'm desperate <PMS@blood.org>
Re: help me, I'm desperate (Steve Linberg)
help with umount? mwilson@sundog.larc.nasa.gov
Re: help with umount? <doug@tc.net>
Re: HTML::Element::extract_links not grabbing frame sou (Earl Hood)
Jeeves specification parser for CDIF or SELECT? <jwilmes@lilly.com>
Re: Make people read the docs, was: Re: PerlRing??? (brian d foy)
Parachat API <ofernan@prenhall.spammo.com>
Re: Perl *is* programming (was Re: Is there a "Newsgrou <cmcurtin@interhack.net>
Re: perl databases ?? (Parenttime)
Perl to read spreadsheet files <kluff@enterprise.net>
Re: PerlRing??? <cmcurtin@interhack.net>
Re: pop3 access via the web schwern@starmedia.net
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 23 Mar 1998 19:13:59 +0000
From: James <James@cydaps.nospam.co.uk>
Subject: - Perl Script to Find & Display Matches.. -
Message-Id: <Kv7kgOA3RrF1EwWu@cydaps.co.uk>
Hi!
Just as I thought I had found the solution, it all goes wrong again!
I have developed the following script that is supposed to display any
vacancies from a flat-text based file (at the bottom of this posting)
that match the specific agency (in this case ICL). This part of the
script works fine, the problems arise when it is supposed to display 10
vacancies per page. There are 11 vacancies that should match in the
database, and the various counts etc match perfectly, but *all* of the
matching vacancies are shown, then when clicking on the Next Match
button, no vacancies are shown (the figures are still correct though)
and the button to say Pervious 10 Matches vanishes...
I guess that my method of 'storing' the matching vacancies is wrong, but
can anyone help me out on this one as I am desperately trying to get
this to work...
Thanks so much for any help offered with this, it is much appreciated!
Best wishes
James
Example of the job_display.cgi script
#!/usr/bin/perl
$HitsPerPage = 10;
$data = "data/vacancy-icl-sap.txt";
$cgiurl = "/cgi-bin/job_display.cgi";
require "find.pl";
@day = (Sun,Mon,Tue,Wed,Thu,Fri,Sat);
@month = (Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec);
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs){
($name, $value) = split(/=/, $pair);
$name =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
if ($FORM{$name}) {
$FORM{$name} = "$FORM{$name}, $value";
}
else {
$FORM{$name} = $value;
}
}
$matchcount=0;
open (data, "$data");
@details = <data>;
close (data);
foreach $pair (@details) {
($id,$agency,$title) = split(/_/, $pair);
if ($agency eq "ICL") {
$results .= "<tr><td align=center>$id</td> <td
align=center>$agency</td> <td align=center>$title</td></tr>\n";
$matchcount++;
}
}
# SCRIPT OUTPUT
print "Content-type: text/html\n\n";
print "<HTML><HEAD><TITLE>ICL Vacancies</TITLE></HEAD>\n";
print "<BODY BGCOLOR=\"#ffffff\" TEXT=\"#000000\">";
print "<H1 ALIGN=CENTER>ICL Vacancies</H1>\n";
print "<P ALIGN=CENTER><SMALL>";
print "(<STRONG>$matchcount</STRONG> match";
if ($matchcount == 1) {
print " found)";
}
else {
print "es found)";
}
print "</SMALL>\n";
unless ($FORM{'first'}) { $FORM{'first'} = 1; }
unless ($FORM{'last'}) { $FORM{'last'} = $HitsPerPage; }
if ($matchcount == 0) {
print "<P ALIGN=CENTER>There are currently no vacancies in the
database!";
print "</P>\n";
}
else {
print "<P ALIGN=CENTER><STRONG>Matches $FORM{'first'} ";
if ($matchcount < $FORM{'last'}) {
print "- $matchcount</STRONG></P>\n";
}
else {
print "- $FORM{'last'}</STRONG></P>\n";
}
print "<HR WIDTH=50%>\n";
$Count = 0;
print "<center><table width=\"90%\" border=0
bgcolor=\"#cccccc\">\n";
&PrintEntry;
print "</table><center>\n";
print "<P><CENTER><TABLE><TR>\n";
if ($FORM{'first'} > 1) {
print "<TD><FORM METHOD=POST ACTION=\"$cgiurl\">\n";
print "<INPUT TYPE=HIDDEN NAME=\"first\" ";
print "VALUE=\"",($FORM{'first'}-$HitsPerPage),"\">\n";
print "<INPUT TYPE=HIDDEN NAME=\"last\" ";
print "VALUE=\"",($FORM{'last'}-$HitsPerPage),"\">\n";
print "<INPUT TYPE=SUBMIT ";
print "VALUE=\"Last $HitsPerPage Matches\">\n";
print "</FORM></TD>\n";
}
if ($FORM{'last'} < $matchcount) {
print "<TD><FORM METHOD=POST ACTION=\"$cgiurl\">\n";
print "<INPUT TYPE=HIDDEN NAME=\"first\" ";
print "VALUE=\"",($FORM{'first'}+$HitsPerPage),"\">\n";
print "<INPUT TYPE=HIDDEN NAME=\"last\" ";
print "VALUE=\"",($FORM{'last'}+$HitsPerPage),"\">\n";
print "<INPUT TYPE=SUBMIT VALUE=\"";
$nextset = $matchcount-$FORM{'last'};
if ($nextset == 1) {
print "Next Match";
}
elsif ($nextset < $HitsPerPage) {
print "Next $nextset Matches";
}
else {
print "Next $HitsPerPage Matches";
}
print "\">\n</FORM></TD>\n";
}
print "</TR></TABLE></CENTER></P>\n";
}
print "</BODY></HTML>\n";
exit;
# SUBROUTINES
sub Get_Date {
$mtime = time unless ($mtime);
($mday,$mon,$yr) = (localtime($mtime))[3,4,5];
$date = "$mday $month[$mon] 19$yr";
return $date;
}
sub PrintEntry {
$Count++;
next if ($Count < $FORM{'first'});
last if ($Count > $FORM{'last'});
print "$results";
}
sub ByDate {
$aval = $mtime{$a};
$bval = $mtime{$b};
$bval <=> $aval;
}
sub ByValue {
$aval = $truval{$a};
$bval = $truval{$b};
$bval <=> $aval;
}
########################### End of script
Example of the vacancy-icl-sap.txt file
1_ICL_IT Manager
2_SAP_Systems Analyst
3_ICL_Programmer
4_ICL_Business Manager
5_SAP_Sales Person
6_ICL_Finance Director
7_ICL_IT MANAGER
8_ICL_Work Shop Assistant
9_ICL_Manger
10_ICL_Site Manager
11_ICL_Jeweller
12_ICL_IT Development Office
13_ICL_CGI Developer
james@cydaps.nospam.co.uk (please remove nospam. if emailing)
------------------------------
Date: Mon, 23 Mar 1998 17:42:38 GMT
From: wef@N0SPAM_wef.net (Wef)
Subject: [Q] Making Money with PERL/CGI??
Message-Id: <35169c70.11273490@news>
((( here come the flames )))
Are there any methods to finding clients who need custom PERL scripts
for the WWW??? That is, without the use of SPAM???
There must be tons of potential web clients that need customized
search engines, online databases, shopping carts, etc... How do I
find these people??!?!? Or better yet, how do they find me!!?!?!?!?
Very Truly Yours,
JWefler
wef@wef.net
P.S. I won't hear you, Tom C.... You've been filtered...
------------------------------
Date: Mon, 23 Mar 1998 12:57:32 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: [Q] Making Money with PERL/CGI??
Message-Id: <comdog-ya02408000R2303981257320001@news.panix.com>
Keywords: from just another new york perl hacker
In article <35169c70.11273490@news>, wef@N0SPAM_wef.net posted:
>Are there any methods to finding clients who need custom PERL scripts
>for the WWW??? That is, without the use of SPAM???
it's not significantly different than other businesses of a similar
nature. you might want to check out some marketing and sales books
to see about promoting your services.
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>
------------------------------
Date: Mon, 23 Mar 1998 10:29:15 -0800
From: fscholz@wv.mentorg.com
To: frederic@xilinx.com
Subject: Re: Backreference problem
Message-Id: <3516A9FB.4CDD3AE0@wv.mentorg.com>
Surround the '1' with curley braces:
$StringToBeChanged =~ s/(.*)_/${1}01_/;
- Frank
Frederic RIVOALLON wrote:
>
> Hello all,
>
> I would like to insert the string '01' before an underscore in a
> string so I wrote:
>
> $StringToBeChanged =~ s/(.*)_/$101_/;
>
> But this does not work perl must be looking for $101 instead of $1 and
> then 01.
>
> Is there a way to make this work without using a separate variable like
> this
>
> $fix = '01_';
> $StringToBeChanged =~ s/(.*)_/$1$fix/;
>
> If you know the answer please email to frederic@xilinx.com
>
> Thanks
------------------------------
Date: Mon, 23 Mar 1998 13:39:19 -0600
From: nmcfadye@mae.carleton.ca
Subject: CGI.pm
Message-Id: <6f6dkk$l6u$1@nnrp1.dejanews.com>
I am trying to use CGI.pm but could not install it via th einstructions given:
When doing
perl Makefile.PL
I get an error saying
Syntax error in file Makefile.PL at line 1, next 2 tokens "use ExtUtils"
Execution of Makefile.PL aborted due to compilation errors.
I dont' seem to have ExtUtils on my system. How cna I fix this?
I trying copying the CGI.pm file into /usr/local/lib/perl but that didn't
help.
Also I do access the comp.lang.perl newsgroups without going thru dejanews.
Why can't I access this newsgroup via Netscape Newsgroups, what is the server
name?
Thanks in advance, please include e-mail
Neil McFadyen
Carleton U
Ottawa, Canada
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Mon, 23 Mar 1998 09:36:42 -0800
From: Nathan Franzen <franzen@pmel.noaa.gov>
Subject: Re: Challenge your pr...distance calculation
Message-Id: <Pine.SOL.3.96.980323092455.1817A-100000@corona.pmel.noaa.gov>
On Sun, 22 Mar 1998, TomH wrote:
> Actually, a more significant problem is that you shouldn't consider
> every customer that is found in the box when distance is the only
> factor, since a customer due east, west, north, or south that is just
> outside the box might be closer than one just inside a corner. To
> handle it correctly you need to calculate the distance to the closest
> boundary line and only pick a customer within that radius. Using the
> dot product makes it easy, although the hypotenuse is close enough for
> short distances. I doubt he wanted to calculate the great circle's arc
> length between two zipcodes.
On the other hand, if the original questioner (or anyone else) *did* want
to calculate the great circle distance, I can contribute a little
function that does it. I know, this contribution is almost completely off
the thread, but I offer up my tiny piece of code in case anyone is
curious. It may save someone five or ten minutes of work.
I did in fact write this code so that I could select among a group of
objects the one closest to a specified location. I didn't have much of an
algorithm to speak of, but it was a small group of objects...
-Nathan
-------
#!/opt/bin/perl -w
use strict;
use POSIX qw(acos);
print "Type a pair of latitudes and longitudes (as 0 0 122 47)\n";
print " (control-D to end )\n";
while (<>){
print great_circle_distance(split /\D+/, $_),"\n";
};
sub great_circle_distance{
my ($lat1, $lon1, $lat2, $lon2) = @_;
my ($theta, $dist);
my $pi = 3.14159265;
$lat1 *= $pi/180;
$lat2 *= $pi/180;
$lon1 *= $pi/180;
$lon2 *= $pi/180;
$theta = ($lon2 - $lon1);
$dist = acos(sin($lat1)*sin($lat2) + cos($lat1)*cos($lat2)*cos($theta));
if ($dist < 0){$dist += $pi};
$dist = $dist*6371.2; # Earth's radius (km);
return $dist;
};
------------------------------
Date: 23 Mar 1998 18:31:20 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: checking for undefined elements in an array
Message-Id: <6f69po$6db@news-central.tiac.net>
In article <6f66v4$h93@julius.ling.ohio-state.edu>,
Kevin B Cohen <kcohen@julius.ling.ohio-state.edu> wrote:
>greetings,
>
>i'm looking for an elegant way to see if there are any undefined
>elements in an array. the best thing i can thiink of to do is to
>write a subroutine, something like
>
>sub IsFullyDefined {
> my (@array) = @_;
> my $stop = $#array; # index of last element
> my $i; # counter
> for ($i = 0; $i <= $stop; $i++) {
> ($array[$i] == undef) && return;
> }
> return 1;
>}
You might want to use defined to test whether an element's defined or not
e.g.
sub isFullyDefined {
for (@_) {
return unless defined;
}
return 1;
}
Because using the numerical equivalence with undef will generate a true
result (with a warning if -w is in use) when you test against an element
whose numerical value is 0.
#!/usr/local/bin/perl -w
foreach $item (0, 1, 'banana') {
if ($item == undef) {
print "$item is undef?\n";
}
}
produces this output:
Use of uninitialized value at ./try.pl line 4.
0 is undef?
Use of uninitialized value at ./try.pl line 4.
Use of uninitialized value at ./try.pl line 4.
Argument "banana" isn't numeric in eq at ./try.pl line 4.
banana is undef?
Hope this helps,
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@colltech.com | Collective Technologies (work)
------------------------------
Date: Mon, 23 Mar 1998 14:01:10 -0500
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: compiling perl
Message-Id: <1d6bfkf.ivvoad4g2h42N@slip166-72-108-111.ny.us.ibm.net>
Cory S. Moll <Cory-M@usa.net> wrote:
> Oh heh. I remember this program. It made huge exe files when it was done..
> a simple 6K perl script was turned into a 6M executable. I'm not sure why
It is probably just creating a version of the Perl interpreter that has
the source file embedded in it.
--
Kevin Reid. | Macintosh.
"I'm me." | Think different.
------------------------------
Date: Mon, 23 Mar 1998 18:28:48 GMT
From: jason@cimedia.com (Jason Bodnar)
Subject: Re: connecting to a port like netcat does
Message-Id: <3516a9c1.847486163@news.internetmci.com>
epronk@emt.ie.philips.nl wrote:
>How can I easily connect to a port like netcat does?
>
>I want to do someting like:
>
>FH = something('somehost', $someport);
>
>select FH;
>
>$a = <>;
>if ($a eq 'login:')
>{
> print 'myusername';
>}
$ perldoc IO::Socket
--
Jason C. Bodnar
jason@cimedia.com
Internet Programmer
Cox Interactive Media
------------------------------
Date: Mon, 23 Mar 1998 18:43:14 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Creating a unique id number?
Message-Id: <EqAC03.9M4@world.std.com>
millers3@sonic.net (Leonard Miller) writes:
>I'd like to create a unique id
>number that the user will get when they first submit and can be passed
>along with the next submitted form.
How about using a file to store the last used ID number, opening and
locking the file, read the number, incrementing it, and storing the
new number back into the file.
Pretty much the same way that hit counters are done.
--
Andrew Langmead
------------------------------
Date: 23 Mar 1998 11:59:13 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: khaines@oshconsulting.com
Subject: Re: Creating a unique id number?
Message-Id: <8c1zvtnshq.fsf@gadget.cscaper.com>
>>>>> "khaines" == khaines <khaines@oshconsulting.com> writes:
khaines> my $id = time() . '0' x (5 - length($$)) . $$;
That's scary. How about:
my $id = sprintf "%d%05d", time, $$;
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 161 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
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
------------------------------
Date: Mon, 23 Mar 1998 17:48:01 GMT
From: wef@N0SPAM_wef.net (Wef)
Subject: Going Rates for PERL Programming???
Message-Id: <35179f1e.11959503@news>
Here's what my one and only client told me about the going rates for
PERL/CGI scripting for the WWW.
$45/hour for "tweaking" existing scripts. Meaning the client wants ou
to change a few lines in a 'formmail.pl' script for instance...
$100/hour for custom scripting... Meaning the client wants something
entirely different than what he/she can find on the web...
How do these rates compare....????
JWefler
wef@wef.net
------------------------------
Date: Mon, 23 Mar 1998 13:02:38 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Going Rates for PERL Programming???
Message-Id: <comdog-ya02408000R2303981302380001@news.panix.com>
Keywords: from just another new york perl hacker
In article <35179f1e.11959503@news>, wef@N0SPAM_wef.net posted:
>$45/hour for "tweaking" existing scripts. Meaning the client wants ou
>to change a few lines in a 'formmail.pl' script for instance...
>
>$100/hour for custom scripting... Meaning the client wants something
>entirely different than what he/she can find on the web...
it's like other businesses - if you are in short supply you charge
more and if you aren't you charge less. you charge what your market
will bear, which often will depend on how your clients perceive the
quality of your work and the experience of working with you. the
more skills that you have, the more valuable your time.
your rates also depend on the internal structure that you need to
support, but again, this is no different than any other business.
you might want to read a book on be a contractor.
good luck :)
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>
------------------------------
Date: 23 Mar 1998 19:25:07 GMT
From: "PMS" <PMS@blood.org>
Subject: help me, I'm desperate
Message-Id: <01bd5691$40f9c7c0$3b9ecf82@neff1.gatech.edu>
To all:
I just need somebody, somewhere to recommend a good website where I can get
some examples of CGI script/Perl code that will allow information entered
in a form to be downloaded into a text file on my end. That is, I'm
developing on-line registration for an orientation program and just need
one good example of code that will allow the information sent to me to be
appended to a regular, old text file. I've looked at many, many sites on
the Web and found not ONE example of this! And I think this is a fairly
common procedure...
Thanks,
Holly from Georgia Tech
------------------------------
Date: Mon, 23 Mar 1998 14:37:31 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: help me, I'm desperate
Message-Id: <linberg-2303981437310001@projdirc.literacy.upenn.edu>
In article <01bd5691$40f9c7c0$3b9ecf82@neff1.gatech.edu>, "PMS"
<PMS@blood.org> wrote:
> To all:
>
> I just need somebody, somewhere to recommend a good website where I can get
> some examples of CGI script/Perl code that will allow information entered
> in a form to be downloaded into a text file on my end. That is, I'm
> developing on-line registration for an orientation program and just need
> one good example of code that will allow the information sent to me to be
> appended to a regular, old text file. I've looked at many, many sites on
> the Web and found not ONE example of this! And I think this is a fairly
> common procedure...
> Thanks,
> Holly from Georgia Tech
Start at http://www.perl.com
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: 23 Mar 1998 12:21:44 -0500
From: mwilson@sundog.larc.nasa.gov
Subject: help with umount?
Message-Id: <wglnu19vbr.fsf@sundog.larc.nasa.gov>
Hi,
>From within a script I'm working on I need to mount a floppy, copy some
files from it then unmount it. The mount works ok as such:
system("mount /mnt/floppy");
but after the copy has completed I'm having problems with the umount:
system("umount /mnt/floppy");
I keep getting the following error:
umount: /dev/fd0: device is busy
I'm waiting until the copy completes to execute the command but for
some reason the system still thinks the device is busy. I've looked
on CPAN for some device related modules but haven't seen anything yet.
Does anyone know of or have a better way to deal with mounting and
unmounting filesystems from within a script?
Thanks!
-Mark.
(I'm running version 5.004_04 on a NEC laptop running Linux Redhat 4.2)
---
Mark Wilson 757-827-4631
Research Scientist m.r.wilson@larc.nasa.gov
Analytical Services & Materials, Inc. mwilson@sundog.larc.nasa.gov
------------------------------
Date: 23 Mar 1998 13:14:17 -0500
From: Douglas McNaught <doug@tc.net>
Subject: Re: help with umount?
Message-Id: <m2wwdlmg06.fsf@ono.tc.net>
mwilson@sundog.larc.nasa.gov writes:
> From within a script I'm working on I need to mount a floppy, copy some
> files from it then unmount it. The mount works ok as such:
>
> system("mount /mnt/floppy");
>
> but after the copy has completed I'm having problems with the umount:
>
> system("umount /mnt/floppy");
>
> I keep getting the following error:
>
> umount: /dev/fd0: device is busy
More of a Unix than a Perl question, but...
I bet you're doing
chdir('/mnt/floppy');
before copying the files. Unix will refuse to dismount a filesystem
that is in use by processes on the system; having /mnt/floppy as your
CWD counts as "in use".
-Doug
--
sub g{my$i=index$t,$_[0];($i%5,int$i/5)}sub h{substr$t,5*$_[1]+$_[0],1}sub n{(
$_[0]+4)%5}$t='encryptabdfghjklmoqsuvwxz';$c='fxmdwbcmagnyubnyquohyhny';while(
$c=~s/(.)(.)//){($w,$x)=g$1;($y,$z)=g$2;$w==$y&&($p.=h($w,n$x).h($y,n$z))or$x==
$z&&($p.=h(n$w,$x).h(n$y,$z))or($p.=h($y,$x).h($w,$z))}$p=~y/x/ /;print$p,"\n";
------------------------------
Date: 23 Mar 1998 18:30:14 GMT
From: ehood@medusa.acs.uci.edu (Earl Hood)
Subject: Re: HTML::Element::extract_links not grabbing frame sources
Message-Id: <6f69nm$fcv@news.service.uci.edu>
In article <6f1jbb$um8$2@phaedrus.kralizec.net.au>,
Peter G. Martin <peterm@zeta.org.au> wrote:
>Check out Gisle Aas' dtd2pm.pl in libwww, under the HTML directory.
>Last version I saw handled only HTML3.2, and filtered the DDT file
>to output a ready-made pm file with hashes of reserved words in
>various contexts etc.
>
>I'm currently playing with a slightly hacked version
>that seems to be handling the HTML4.0 DTD reasonably well --
>the only significant changes it appears to require are
>handling "reserved" attributes in the version of the DTD
>I have.
You may want to try out SGML::DTD available at
<URL:http://www.oac.uci.edu/indiv/ehood/perlSGML.html>.
It is a DTD parser and provides several methods to access the information
contained in a DTD. The parser has been tested on big DTDs, and
should handle the HTML DTDs fine. It should be straight-forward
to use it to generate the rules for an HTML parser.
--ewh
--
Earl Hood | University of California: Irvine
ehood@medusa.acs.uci.edu | Electronic Loiterer
http://www.oac.uci.edu/indiv/ehood/ | Dabbler of SGML/WWW/Perl/MIME
------------------------------
Date: Mon, 23 Mar 1998 13:52:45 -0500
From: Jim Wilmes <jwilmes@lilly.com>
Subject: Jeeves specification parser for CDIF or SELECT?
Message-Id: <3516AF7D.724A@lilly.com>
Srinivasan's Advanced Perl Programming shows how to construct a code
generator using two a specification parser for input and template parser
for output. Does anyone know of an existing specification parser for
either generic CDIF files (a standard CASE tool export format) or
specifically for Select Software's CASE tool?
------------------------------
Date: Mon, 23 Mar 1998 13:08:09 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Make people read the docs, was: Re: PerlRing???
Message-Id: <comdog-ya02408000R2303981308090001@news.panix.com>
Keywords: from just another new york perl hacker
In article <1d6cgm8.1sqf3nuxzyw00N@host037-206.seicom.net>, joergen.lang@schwaben.de (Joergen W. Lang) posted:
>Ok, let me try a different approach.
>
>### Scenario 1a: Perl on local machine, soft way: ###
>
>- A slightly extended perl -v is made default. This will come up
>everytime Perl is started unless disabled, like this:
>### Scenario 1b: Perl on local machine, hard way: ###
>
>Perl just won't run, if there is no documentation on the user's machine.
>Instead the user is presented with a message like this:
yep, let's punish the people who know what they are doing as well.
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>
------------------------------
Date: Mon, 23 Mar 1998 14:44:33 -0500
From: "Obed Fernandez" <ofernan@prenhall.spammo.com>
Subject: Parachat API
Message-Id: <6f6e15$g281@vesta.prenhall.com>
Parachat offers IRC style chat through proprietary Java clients and
Anyone know if Parachat has an API accessible via JavaScript on the same
page as their applet? Alternatively, does anyone know details of the
protocol used between Parachat and the chat clients?
Want to develop a bot that will login to the Parachat server as a user and
answer questions. Also would like to develop a CGI based proxy that will
let non-Java users participate in the chat.
Anyone with experience doing this please contact me.
Obed Fernandez
------------------------------
Date: 23 Mar 1998 13:50:40 -0500
From: Matt Curtin <cmcurtin@interhack.net>
To: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Perl *is* programming (was Re: Is there a "Newsgroup" for Newbies to Perl?)
Message-Id: <86hg4pi6m7.fsf@strangepork.interhack.net>
Randal Schwartz <merlyn@stonehenge.com> writes:
> Programming is a science, and an art. [...]
> It's something you're either up for, or not.
When people ask me if programming is a good career option for them, I
say that programming is like physics (or music), in that it's either
easy or impossible.
Not everyone can get some education and be "trained" for a job as a
programmer. No more so than can just anyone be trained to be a
sculptor or composer. Sure, you can show people the tools of the job,
and teach them about the medium. But in the end, whether they're
adding more value than they're taking depends largely on whether they
"get it".
--
Matt Curtin cmcurtin@interhack.net http://www.interhack.net/people/cmcurtin/
------------------------------
Date: Mon, 23 Mar 1998 13:56:12 -0500
From: "Andrew Lee (Parenttime)" <andrewf@cp.pathfinder.com>
Subject: Re: perl databases ??
Message-Id: <Pine.GSO.3.95.980323134856.22695E-100000@cp.pathfinder.com>
On Sun, 22 Mar 1998, Ryan wrote:
> Date: Sun, 22 Mar 1998 16:56:51 GMT
> From: Ryan <ryan@remove-this-mmainteractive.com>
> Newsgroups: comp.lang.perl.misc
> Subject: perl databases ??
>
> Hello. I have an account at a hosting provider, and I'd like to set up
> a perl database there. I know perl pretty well, and I've done some
> database programming in other languages. But I still don't know where
> to start. I've been to perl.com, and done lots of searching. The perl5
> modules I have available to me on this acount are listed below. With
> this in mind, what type of database should I use, and where do I
> start? I plan to have a few hundred records, with less than 10 fields
> in each record. One field will be user updateable through the web
> page. Thanks a lot for any help.
If you have access to an SQL database, use DBI. If the only relational
databse you can get at is mSQL, use the MSQL-Perl module.
If you do not need a relational database, build your own DBM database (I
guess MLDBM does this). In anycase:
use SDBM_File;
use Fcntl;
tie(%myhash, 'SDBM_File', 'mydata.dat', O_RDWR|O_CREAT, 0600) or die $!;
# now poplulate %myhash ...
# writes to mydata.dat as you go
untie(%myhash);
remember, you can create a hash of arrays ... that is almost a
relational DB table with a primary key.
Hope that helps ...
>
> Ryan
>
> reply to ryan at mmainteractive dot com
>
> Modules available:
> BSD-Resource-1.06
> CGI.pm-2.37b6
> CGI_Imagemap-1.00
> CGI_Lite-1.8
> Compress-Zlib-0.50
> Convert-UU-0.04
> Curses-1.01
> DB_File-1.54
> DBD-mSQL-0.65
> DBI-0.90
> Data-Dumper-2.07
> File-Flock-96.111802
> File-Tools-2.0
> GD-1.14
> HTML-QuickCheck-1.0b1
> HTML-Stream-1.40
> IO-1.1801
> Logfile-0.115
> MD5-1.7
> MIME-parser-1.13
> MLDBM-1.22
> MsqlPerl-1.17
> Net_SSLeay.pm-0.04
> PGP-0.3a
> SHA-1.1
> Socket-1.5
> Term-ReadLine-0.97
> TermReadKey-2.09
> Text-Tabs+Wrap-97.011701
> libnet-1.0506
> libwww-perl-5.14
>
>
-------------------------------------------------------------
Andrew F. Lee | |
Software Engineer | parenttime.com |
email: andrewf@pathfinder.com | 1271 Avenue of the Americas |
Phone: (212) 522-2769 | New York, N.Y. 10020 |
-------------------------------------------------------------
When I say, "Ignore the man behind the curtain."
That is because there is no man behind the curtain.
------------------------------
Date: Mon, 23 Mar 1998 18:49:48 +0000
From: Kevin Luff <kluff@enterprise.net>
Subject: Perl to read spreadsheet files
Message-Id: <3516AECA.332BB2A9@enterprise.net>
Dear all,
I need to write some scripts to get info from lotus spreadsheet files
onto a website.
Is there any way of reading the files directly ?
My demo test at the moment involves exporting the sheet to txt and then
displaying nice.
I dont need the forumlae or anything....just values, but as these change
on a fairly regular basis I can't trust the users to to the export - as
they are all accountants !!!
Getting the graphs in would be nice though !
Any thoughts greatly appreciated
TIA
Kevin
--
=====================================================
Don't tell my mother I'm a programmer.
She thinks I'm a piano player in a brothel
=====================================================
Get me at:
Home(GMT) kluff@enterpise.net
Work(GMT) kevin.luff@hil.hftrust.com
WWW http://homepages.enterprise.net/kluff
=====================================================
------------------------------
Date: 23 Mar 1998 14:11:00 -0500
From: Matt Curtin <cmcurtin@interhack.net>
To: joergen.lang@schwaben.de (Joergen W. Lang)
Subject: Re: PerlRing???
Message-Id: <86emzti5ob.fsf@strangepork.interhack.net>
joergen.lang@schwaben.de (Joergen W. Lang) writes:
> Since Perl is cross-platform, maybe it would be a good idea to have
> a cross-platform version of the docs instead of (or complementing)
> the pod-files ?
pod is already cross-platform.
What it sounds like is needed is an equivalent of perldoc(1) on
non-Unix machines. (I assumed, apparently incorrectly, that perldoc
was found everywhere that a recent version of Perl was.)
I wrote a trivial web interface to perldoc ... maybe I should update
it, make it nice and pretty, fully cross-referenced, and all that sort
of thing.
Would that address your concern?
--
Matt Curtin cmcurtin@interhack.net http://www.interhack.net/people/cmcurtin/
------------------------------
Date: Mon, 23 Mar 1998 11:41:01 -0600
From: schwern@starmedia.net
To: gordon3@iname.com
Subject: Re: pop3 access via the web
Message-Id: <6f66nd$d7j$1@nnrp1.dejanews.com>
There is no 'required script' and it need not be in perl. It could be written
in Turtle Graphics if you really wanted to.
Anyhow, you want one of these modules if you DO want to use Perl:
Module Mail::POP3Client (SDOWD/POP3Client-1_15.tar.gz)
Module Net::POP3 (GBARR/libnet-1.0605.tar.gz)
Available from a friendly CPAN archive near you. http://www.perl.com/CPAN/
In article <gordon3-2103982238020001@unknown015102.rev.telstra-mm.net.au>,
gordon3@iname.com (gordon) wrote:
>
> I would like to access my pop3 e-mail from www browser but using a cgi
> script on my unix server.
> Can anyone point me to the required script? I assume it would be in perl?
> Thanks
> Gordon
>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
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 2164
**************************************