[13978] in Perl-Users-Digest
Perl-Users Digest, Issue: 1388 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 15 21:08:55 1999
Date: Mon, 15 Nov 1999 18:05:21 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <942717921-v9-i1388@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 15 Nov 1999 Volume: 9 Number: 1388
Today's topics:
Re: ###### GET YOUR PentiumII-366 FOR ONLY $9.99 ###### <flavell@mail.cern.ch>
Re: ###### GET YOUR PentiumII-366 FOR ONLY $9.99 ###### <cassell@mail.cor.epa.gov>
Re: ###### GET YOUR PentiumII-366 FOR ONLY $9.99 ###### (Thomas Zajic)
'0 % (2**32)' fails on AS builds, works fine on other p <ronnie@catlover.com>
Re: another Reg. Exp. problem <cbeatson@mail.ci.lubbock.tx.us>
Re: another Reg. Exp. problem <reembar@netvision.net.il>
Re: another Reg. Exp. problem <cassell@mail.cor.epa.gov>
Re: another Reg. Exp. problem <cassell@mail.cor.epa.gov>
Re: Auto-Email <cassell@mail.cor.epa.gov>
Re: Beginner <cassell@mail.cor.epa.gov>
Re: Can open file with Telnet but not browser <cassell@mail.cor.epa.gov>
Re: Can't get hostname with gethostbyaddr <cassell@mail.cor.epa.gov>
Re: Can't get hostname with gethostbyaddr <slanning@bu.edu>
Re: Can't locate object method <rootbeer@redcat.com>
Re: Cannot compile under Emacs for WIndows <cassell@mail.cor.epa.gov>
Re: CGI cookies and Internet Explorer for the Mac <rootbeer@redcat.com>
Compiling 5.005_30 on IRIX 6.5 <cfarley@videotron.ca>
Re: CPAN with LWP <rootbeer@redcat.com>
Re: cron filehandle <cassell@mail.cor.epa.gov>
developer required for advanced Perl work (Bretto)
Re: developer required for advanced Perl work <uri@sysarch.com>
Re: DHTML spreadsheet app. No CGI? <cassell@mail.cor.epa.gov>
Re: DHTML spreadsheet app. No CGI? <flavell@mail.cern.ch>
Re: Easy pattern matching for an apostrophe <rootbeer@redcat.com>
Re: File read-write (Martien Verbruggen)
Re: GD Perl question <rootbeer@redcat.com>
gd.pm <spewmuffin@my-deja.com>
Re: gd.pm <cassell@mail.cor.epa.gov>
Re: gd.pm (Martien Verbruggen)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 16 Nov 1999 01:48:50 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: ###### GET YOUR PentiumII-366 FOR ONLY $9.99 #######;dlkh 0596'; gp[5ifkl'l
Message-Id: <Pine.HPP.3.95a.991116014718.26840A-100000@hpplus01.cern.ch>
On Mon, 15 Nov 1999, David Cassell wrote:
> In fact, it's more likely that the mail addresses are innocent
> victims. Don't mailbomb. There is too much 'collateral
> damage'.
It's also a criminal offence in the UK. See uk.telecom for one chap
who's apparently being prosecuted for it right now.
[f'ups prophylactically set]
------------------------------
Date: Mon, 15 Nov 1999 16:42:31 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: ###### GET YOUR PentiumII-366 FOR ONLY $9.99 #######;dlkh 0596'; gp[5ifkl'l
Message-Id: <3830A877.CC5B4BA5@mail.cor.epa.gov>
Kragen Sitaker wrote:
>
> In article <3830601E.64952F37@wix.dk>, Christian Wix <christian@wix.dk> wrote:
> >Everybody should reply the original mail so it won't happen again. You could
> >some MB with garbage too.
>
> There's no guarantee the mail addresses in it are correct.
In fact, it's more likely that the mail addresses are innocent
victims. Don't mailbomb. There is too much 'collateral
damage'.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 16 Nov 1999 00:50:39 GMT
From: zlatko@gmx.at (Thomas Zajic)
Subject: Re: ###### GET YOUR PentiumII-366 FOR ONLY $9.99 #######;dlkh 0596'; gp[5ifkl'l
Message-Id: <slrn831aq5.q6a.zlatko@sphere.fdns.net>
On 15 Nov 1999 21:44:24 GMT, Big Daddy wrote:
> I also hate people who post in MIME/HTML.
And that's why you include the whole damn article we all hate so much
as a full quote? (hint, hint!)
Thomas (now where did I put my asbestos shorts?)
--
=-------------------------------------------------------------------------=
- Thomas Zajic <thomasDOTzajicATtelewebDOTat> Linux-2.0.38/slrn-0.9.5.7 -
- "It is not easy to cut through a human head with a hacksaw." (M. C.) -
=-------------------------------------------------------------------------=
------------------------------
Date: Mon, 15 Nov 1999 23:52:48 GMT
From: Ron Grabowski <ronnie@catlover.com>
Subject: '0 % (2**32)' fails on AS builds, works fine on other platforms
Message-Id: <38309E29.E2F7E9A8@catlover.com>
C:\>perl -le "print 0 % (2**31)"
0
C:\>perl -le "print 0 % (2**32)"
Illegal modulus zero at -e line 1.
[errors occured on all my NT boxes running ActiveState builds 515, 517,
and 522]
Now on a Solaris box (5.6):
% perl -le 'print 0 % (2**31)'
0
% perl -le 'print 0 % (2**32)'
0
Why is this? Is this a bug?
------------------------------
Date: Mon, 15 Nov 1999 17:26:18 -0600
From: "Chris Beatson" <cbeatson@mail.ci.lubbock.tx.us>
Subject: Re: another Reg. Exp. problem
Message-Id: <80q4v3$1di$1@spider.ci.lubbock.tx.us>
> That is a fairly mindless answer. The '/s' modifier affects *only* the
> interpretation of the '.' metacharacter in a regex, and there aren't any
> of those in there, are there?
Oops. Sorry.
------------------------------
Date: Tue, 16 Nov 1999 01:22:43 +0200
From: Re'em Bar <reembar@netvision.net.il>
Subject: Re: another Reg. Exp. problem
Message-Id: <383095C3.11F0564C@netvision.net.il>
well, I did make a mistake after all:
the problem is the expression doesn't match when I have > inside the
comment:
$text=~s/<!--[^-->]*-->//g;
anyway, I tried:
$text=~s/<!--([^-][^-][^>])*-->//g;
but it doesn't match when there is more then one > character inside the
comment.
$text=~s/<!--[^(-->)]*-->//g;
won't work either.
so what else left?
--
Re'em
http://snark.co.il
------------------------------
Date: Mon, 15 Nov 1999 16:18:08 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: another Reg. Exp. problem
Message-Id: <3830A2C0.CCFF0FAB@mail.cor.epa.gov>
Re'em Bar wrote:
>
> Tom, if you don't like my questions, just ignore them.
> You probably are able even to exclude my messages in your news reader if
> you find them so unpleasant. should I found the answer in the FAQ I
> wouldn't bother myself.
Tom was just trying to be helpful, even if that wasn't how you
interpreted his words. Usenet does have that diasadvantage.
For example, your words above probably are being interpreted
by many regulars in this newsgroups as hostility and defensiveness.
I'm sure that wasn't your intent. But if you irritate all
the regulars to the extent that everyone skilled in Perl
killfiles you, who will answer your questions? The people
who *cannot* program well yet. Which means that you would get
only the weak answers, instead of the strong ones.
Double plus ungood.
So please, get yourself a copy of the FAQ. Use perldoc so
you can browse the FAQ efficiently. Read the Perl docs too.
You may want to look at this tutorial:
http://www.netcat.co.uk/rob/perl/win32perltut.html
And you may want to buy this book:
"Elements of Programming with Perl" by Andrew Johnson
[which will also tell you more about using the Perl docs]
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Mon, 15 Nov 1999 17:16:29 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: another Reg. Exp. problem
Message-Id: <3830B06D.E358EF1F@mail.cor.epa.gov>
Re'em Bar wrote:
>
> well, I did make a mistake after all:
At least one.
> the problem is the expression doesn't match when I have > inside the
> comment:
> $text=~s/<!--[^-->]*-->//g;
And you still don't have character classes grokked.
> anyway, I tried:
> $text=~s/<!--([^-][^-][^>])*-->//g;
You want to match zero or more sequences of not-hyphen, not-hyphen,
not-greaterthan ? I think you're still not getting the form
you really want to match.
> but it doesn't match when there is more then one > character inside the
> comment.
Or some other cases as well.
> $text=~s/<!--[^(-->)]*-->//g;
> won't work either.
> so what else left?
The advice given by others in this newsgroup, as well as in the
FAQ. Use HTML::Parse or HTML::Parser, whichever suits you
better. You cannot do a full parse of HTML using regexes.
You could do the parsing with Parse::RecDescent too, if you'd
rather.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Mon, 15 Nov 1999 16:34:18 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Auto-Email
Message-Id: <3830A68A.4EC004B@mail.cor.epa.gov>
styxx wrote:
>
> I am looking for the expression or script that will automate an Email
> mailing.
[snip]
> All I have seen is scripts that invoke the Email program for the user...
> This is not what I want.
> I want an Email sent automatically from my PERL script.
Then you'll have to write a *lot* of code.
[1] This is covered in the Perl FAQ, so you should read it.
try this at a command prompt:
perldoc -q send.+mail
And you may also want to read what the ActivePerl [win32] FAQ
has to say on this subject.
[2] Doing this by yourself is hard. A script which does all
the work of an MTA will be large and ugly. Use the Perl
modules, and let Perl invoke an 'email' program, either
implicitly or explicitly.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Mon, 15 Nov 1999 15:29:41 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Beginner
Message-Id: <38309765.E981FAF3@mail.cor.epa.gov>
Wayne Bowers wrote:
>
> I am wanting to learn to write Perl. I am totally new to this. Can someone
> point out addresses to check out? If this is the wrong group to post to also
> let me know which one is proper
First, go to www.activestate.com and get the latest build of
ActiveState Perl. Download and double-click to get it to
install itself. It will put the docs on your Start Menu too.
Then read through the FAQ and the ActivePerl [win32] FAQ
to see what kinds of questions you'll want to ask in a few days.
Go to http://www.netcat.co.uk/rob/perl/win32perltut.html
to get a good web tutorial. Buy "Elements of Programming
with Perl" by Andrew Johnson, and read the first several
chapters carefully before beginning your programming quest.
Good luck,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Mon, 15 Nov 1999 15:58:18 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Can open file with Telnet but not browser
Message-Id: <38309E1A.7564EE23@mail.cor.epa.gov>
amonotod wrote:
>
> In article <383037b2@news.together.net>,
> "Amy D. Moore" <amoore@thebigstuff.com> wrote:
[snip]
> > Location of script: http://www.triumphglass.com/locations/default.cgi
So the poster is doing CGI. And...
> do a quick test, some MS machines use c:\perl\bin\ as the working
> directory, so you may need to set your directory... This doesn't
> usually affect Unix machines, but you never know...
I don't know of any webservers which use this directory as
the working directory.
> #!perl
This doesn't work for some servers, like earlier versions of
Apache. Besides, there's no -w flag and no 'use strict' pragma.
> use Cwd;
>
> my $dir=Cwd::cwd;
> print "Content-type: text/html\n\n";
> print "The current dir is $dir\n";
> exit;
This is HTML?
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Mon, 15 Nov 1999 16:40:56 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Can't get hostname with gethostbyaddr
Message-Id: <3830A818.3B0C48B5@mail.cor.epa.gov>
AcCeSsDeNiEd wrote:
>
> Hi,
> I'm trying to get the hostname from an IP address.
>
> My webhost does have the "hostname" and "socket" modules installed.
>
> The OS is: UNIX Type: L8(SCO UNIX Release 3.2v5.0.5, on Pentium)
>
> Perl Version: version 5.004_04 built for i486-pc-sco3.2v5.0
Old, but I've seen worse...
> #!/usr/bin/perl
No -w flag or 'use strict' pragma.
> use Socket;
> use Sys::Hostname;
>
> $ip = '203.120.90.111';
>
> $host_name = gethostbyaddr(inet_aton($ip),AF_INET)||
> die "Could not find host: $!\n";
>
> print $host_name;
>
> The script just dies.
Which, as you've noticed, isn't very informative. die() isn't
helping you because it's throwing messages at the server log.
If you can't look at the server log, then you'll want to get
the error message in another way. Either:
use CGI::Carp qw(fatalsToBrowser);
or code to emulate this. That is, your own dienice subroutine
to throw the error message onto your webpage, then exit() .
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 15 Nov 1999 19:57:26 -0500
From: Scott Lanning <slanning@bu.edu>
Subject: Re: Can't get hostname with gethostbyaddr
Message-Id: <kusd7tbtfrd.fsf@strange.bu.edu>
David Cassell <cassell@mail.cor.epa.gov> writes:
> > Perl Version: version 5.004_04 built for i486-pc-sco3.2v5.0
>
> Old, but I've seen worse...
For some reason the version installed at school is 5.004_04
and the one with Redhat was (at least up to RH5.1). Why did
"everyone" stop upgrading at 5.004_04?
--
"Besides a mathematical inclination, an exceptionally good mastery of
one's native tongue is the most vital asset of a competent programmer."
--Edsger Dijkstra
------------------------------
Date: Mon, 15 Nov 1999 17:12:33 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Can't locate object method
Message-Id: <Pine.GSO.4.10.9911151705260.15797-100000@user2.teleport.com>
On Fri, 12 Nov 1999, Einar [iso-8859-1] =DE=F3r Einarsson wrote:
> Now, most of the time I get an error msg "Can't locate object method
> "new" via package "MIME::Parser" when entering the MIME parsing
> routines.
Only "most" of the time? If things are indeterminate, that's a very bad
sign. Check that you have only one version of your program (and of Perl,
and of the kernel :-) which could be causing the inconsistancy.
Another thing which has been known to cause this error is if you're on a
non-Unix system which could let you mis-capitalize the name of the module
on the 'use' line. It loads the file all right, but it can't find the
package with the wrong capitalization. Could it be something like that?
> When I click the link to display
Ah, via a webserver. Maybe your server (or _something_) is caching without
telling you. That's beyond the scope of this newsgroup.
> I'm out of ideas, and don't know how to debug this since I can't get
> to that portion of the code in offline mode (then it fails to locate
> object method "new" via package Net::POP3 (sigh))
Well, make sure that you're using _that_ module correctly. Good luck!
--=20
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Mon, 15 Nov 1999 15:41:46 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Cannot compile under Emacs for WIndows
Message-Id: <38309A3A.EDEE77A1@mail.cor.epa.gov>
26red@my-deja.com wrote:
>
> I am a new programmer and I just download
> Emacs for Windows. I cannot compile so I am thinking that here is no
> compiler under Windows. Does anybody recommend any compiler for
> Windows. If there is, can you tell me what I am doing wrong.
Either deja.com really gave you a bum steer when you were
searching, or else you're doing something odd. This is a
newsgroup about programming in the Perl language. We try
not to talk about Emacs or compilers.
That said, if you're a new programmer and are trying to
*compile* Emacs for win32, then you really need to go look
in newsgroups which talk about *editors*, because you don't
need to compile Emacs for NT. You can get it already done.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Mon, 15 Nov 1999 18:02:23 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: CGI cookies and Internet Explorer for the Mac
Message-Id: <Pine.GSO.4.10.9911151801430.15797-100000@user2.teleport.com>
On Mon, 15 Nov 1999, Keith Newton wrote:
> Newsgroups: comp.lang.perl.misc, comp.lang.perl
If your news administrator still carries comp.lang.perl, please let him
or her know that that newsgroup has not existed since 1995. If you
have such an outdated newsgroup listing, you are probably missing out
on many other valid newsgroups as well. You'll be doing yourself and
many others a favor to use only comp.lang.perl.misc (and other valid
Perl newsgroups) instead.
> Subject: CGI cookies and Internet Explorer for the Mac
> This problem only seems to occur with Macintosh I.E..
If you're following the proper protocol but some browser or server doesn't
cooperate, then it's the other program's fault. If you're not following
the protocol, then it's your fault. If you aren't sure about the protocol,
you should read the protocol specification. If you've read it and you're
still not sure, you should ask in a newsgroup about the protocol.
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Mon, 15 Nov 1999 20:28:47 -0500
From: Christian Farley <cfarley@videotron.ca>
Subject: Compiling 5.005_30 on IRIX 6.5
Message-Id: <3830B34E.EB9EB456@videotron.ca>
--------------D7856E4EF2B6EB0CE004BC96
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Trying to make with gcc 2.8.1.
Failing with this message:
"Use of uninitialized value at configpm line 339, <GLOS> chunk 2" ...
and so on.
Any ideas?
--
Christian Farley
Administrateur Systeme.
2100 Ste-Catherine Ouest
Montreal, Quebec, Canada
--------------D7856E4EF2B6EB0CE004BC96
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<br>Trying to make with gcc 2.8.1.
<p>Failing with this message:
<br>"Use of uninitialized value at configpm line 339, <GLOS> chunk 2"
... and so on.
<p>Any ideas?
<pre>--
Christian Farley
Administrateur Systeme.
2100 Ste-Catherine Ouest
Montreal, Quebec, Canada</pre>
</html>
--------------D7856E4EF2B6EB0CE004BC96--
------------------------------
Date: Mon, 15 Nov 1999 17:24:57 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: CPAN with LWP
Message-Id: <Pine.GSO.4.10.9911151723440.15797-100000@user2.teleport.com>
On 12 Nov 1999, Danny Aldham wrote:
> Reading the man pages for CPAN, it looks like it will not work through
> a proxy that requires authentication. Is there any way to plug the
> LWP module into CPAN to get around this problem?
Reading the source for CPAN, it looks like it will use LWP when that's
available. But I didn't read the source carefully enough to see whether
that's its first choice. If it won't do what you want, though, be sure to
submit the patch when you've got it ready. :-)
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Mon, 15 Nov 1999 16:03:31 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: cron filehandle
Message-Id: <38309F53.5A21F053@mail.cor.epa.gov>
palenaka@my-deja.com wrote:
>
> I have two cron jobs that aren't functioning correctly on
> a Solaris Box.
[snip]
> There are two problems with the cron jobs. Both scripts function
> correctly when run manually. However when the cron daemon runs the
> scripts, a file is created but nothing is ever written to it. I end up
> with a zero byte file in both cases.
>
> The other problem I notice has to do with the cron reporting.
> Normally when I run a unix cron job, unix will send me an email with the
> results of the cron job, if anything was printed to <STDOUT>. I don't
> get these mailing from the server.
[snip]
cron doesn't run under the same environment as your username.
Different home directory, different environment, different
privileges, ...
> Here are two suggestions by one of my coworkers:
>
> Problem 1, I suggest checking that all paths are specified in all the
> scripts. That's usually what catches me when it works for me manually
> and not in a cron.
One possibility. cron doesn't start up with your usual path.
But also check any environment variables you use.
Use more error-checking. Look into the $! and $? variables,
and sprinkle them through your code to get some answers.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Mon, 15 Nov 1999 23:44:35 GMT
From: news@moggy.com (Bretto)
Subject: developer required for advanced Perl work
Message-Id: <383097f9.6771136@news.lisp.com.au>
I have a project which requires the skills of someone with advanced
knowledge of Perl5.
Currently we have a working version of an Auction system we had
designed for us by a very capable Perl5 programmer, and now wish to
upgrade the system to work from a MySQL database, rather then the old
flat-file structure that this version 1 runs off.
Therefore, the requirements for the programmer are:
1) Advanced knowledge of perl, including experience in connecting to a
MySQL database.
2) Ability to work fast and keep in constant contact with the company.
3) Reasonable rates.
4) MySQL database knowledge an asset.
Please contact me to find out more about this project.
Regards,
Brett Phillips
------------------------------
Date: 15 Nov 1999 20:22:48 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: developer required for advanced Perl work
Message-Id: <x7wvrjut5j.fsf@home.sysarch.com>
>>>>> "B" == Bretto <news@moggy.com> writes:
B> I have a project which requires the skills of someone with advanced
B> knowledge of Perl5.
there is no perl5 only perl.
B> Currently we have a working version of an Auction system we had
B> designed for us by a very capable Perl5 programmer, and now wish to
B> upgrade the system to work from a MySQL database, rather then the old
B> flat-file structure that this version 1 runs off.
that guy was dumb for building it with a flat file and not using
DBI::DBD. if he had, conversion would be trivial.
B> 1) Advanced knowledge of perl, including experience in connecting to a
B> MySQL database.
you don't need advanced perl knowledge to connect to a database.
B> 2) Ability to work fast and keep in constant contact with the company.
i work as fast as the work requires. any faster and i might hurt my
fingers. if you want constant contact, pay for a private t1 to my office.
B> 3) Reasonable rates.
my recent rates are unreasonable which makes me happy. :-)
B> 4) MySQL database knowledge an asset.
hire george reese.
B> Please contact me to find out more about this project.
consider yourself contacted. and consider yourself at home. and consider
yourself one of the family.
don't post jobs in this group. there are jobs groups, perl jobs mailing
lists, etc.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Mon, 15 Nov 1999 17:08:09 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: DHTML spreadsheet app. No CGI?
Message-Id: <3830AE79.BAE5276D@mail.cor.epa.gov>
donnomarz@my-deja.com wrote:
>
> You may be interested in Halfbrain.com. They just introduced the first
> DHTML spreadsheet application called BrainMatter. You can import and
[snip of big marketing routine]
> ** P.S. the beta site currently works with IE4 and IE5 for the PC.
> Netscape and Mac versions are in the works.
Ewwwww. Browser specific webpages. Get thee behind me, Satan!
Really, if the inventor of the web thinks browser-specific
pages are evil, don't you think that we should all take a hint?
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 16 Nov 1999 02:41:43 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: DHTML spreadsheet app. No CGI?
Message-Id: <Pine.HPP.3.95a.991116023401.26840E-100000@hpplus01.cern.ch>
On Mon, 15 Nov 1999 donnomarz@my-deja.com wrote:
> You may be interested in Halfbrain.com.
May we?
> ** P.S. the beta site currently works with IE4 and IE5 for the PC.
> Netscape and Mac versions are in the works.
Must have been the wrong half. CGI works with any protocol-conformant
browser. And, with care, even with MSIE too, surprising as this must
seem to anyone familiar with open standards.
Oh dear, and this is all off-topic for the Perl language group.
Oh well, at least I can set an appropriate f'up.
--
"You have what the Earthers call a 'negative personality'"
- "No, I don't" - "There, you see?" [B5]
------------------------------
Date: Mon, 15 Nov 1999 17:59:05 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Easy pattern matching for an apostrophe
Message-Id: <Pine.GSO.4.10.9911151755330.15797-100000@user2.teleport.com>
On Sun, 14 Nov 1999 tasher1234@my-deja.com wrote:
> What is the syntax for accepting an apostrophe in a last name?
Perl has no syntax with respect to names of humans, only names of
variables, files, and suchlike.
> I have 3 fields: First M. Last.
> I had this before:
> @profiles=grep
> {/Name:(?:(\w+)[\W]+)?(?:(\w+)[\W]+)?.*(?:\b([A-D])\w*)\n/} @profiles;
> I tried this:
> @profiles=grep
> {/Name:(?:([\w']+)[^\w']+)?(?:([\w']+)[^\w']+)?.*(?:\b([A-D])[\w']*)\n/}
> @profiles;
I'm not sure whose names will contain digits and underscores. But maybe if
you added comments to your patterns (using the /x modifier) it would be
easier to read what you're doing. And if you gave an example of a string
which you think should be matching but isn't, or vice versa, that might
help us to guide you towards your solution. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 16 Nov 1999 01:11:56 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: File read-write
Message-Id: <wb2Y3.167$Va.4811@nsw.nnrp.telstra.net>
[Courtesy copy sent to skrishna@zip2.com]
[In a personal email to me (please don't do that again. I am _not_ a
help desk, and this discussion may benefit others with the same
problem) the following was added]
On Mon, 15 Nov 1999 22:27:45 GMT,
Martien Verbruggen <mgjv@comdyn.com.au> wrote:
> On Mon, 15 Nov 1999 18:26:06 GMT,
> krishnasanjay@my-deja.com <krishnasanjay@my-deja.com> wrote:
> > I have the following text file :
> > ----------------
> > This is a test
> > ..
> > ..
> > pattern delete this
> > and also this.
> > -----------------
> > Now I want to delete everything in the file after
> > the pattern is encountered.
>
> # perl -ni -e 'print unless /pattern/ .. 0' files
[copied from email]
> Thanks for your reply. But I believe this will only remove the
> line(s) after the pattern is found. It will not remove characters
> that appear after the pattern is found on the same line.
Ok, so you want to delete everything _after_ the pattern, but you want
to leave the pattern where it is, right? I didn't read it that way in
the original post. My fault.
Changes to the code posted before:
#!/usr/bin/perl -w
use strict;
use Fcntl;
my $oldpos = 0;
my $match = undef;
sysopen(FILE, 'fooobaaa', O_RDWR) || die $!;
while (<FILE>)
{
last if (($match) = /(PATTERN)/);
$oldpos = tell(FILE);
}
truncate(FILE, $oldpos);
seek(FILE, 0, 2);
print FILE "$match\n" if defined $match;
close(FILE);
Note that I put a newline in there. Real text files should have a
newline terminating each line, including the last one. If you don't
want that, feel free to change it. If your pattern may contain a
newline, you probably want to check for that.
Martien
--
Martien Verbruggen |
Interactive Media Division | Begin at the beginning and go on till
Commercial Dynamics Pty. Ltd. | you come to the end; then stop.
NSW, Australia |
------------------------------
Date: Mon, 15 Nov 1999 18:03:57 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: GD Perl question
Message-Id: <Pine.GSO.4.10.9911151802480.15797-100000@user2.teleport.com>
On Mon, 15 Nov 1999, legkaki wrote:
> I am using the GD module to create GIF on the fly.
>
> I am able to generate the image file , but when I save the images
> with by browser it, default to Bitmap (BMP format).
If your browser doesn't do what you want, throw it away and get one with a
manual which tells you how to use it. But unless the browser is written in
Perl, I'm not sure why you're asking in a newsgroup about Perl. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 16 Nov 1999 00:32:25 GMT
From: SpewMuffin <spewmuffin@my-deja.com>
Subject: gd.pm
Message-Id: <80q8mq$u5d$1@nnrp1.deja.com>
Problem: Display a gif from a given data.
I have already organized the data so that it is ready for
deploy. The only problem is that I can't figure out how
to make perl create the gif. I have already installed
gd v1.22, but the script's not recognizing that gd is
installed when I use the 'use gd;' line.
Any takers?
--
SpewMuffin; E-mail: spewmuffin@my-deja.com
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 15 Nov 1999 17:31:58 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: gd.pm
Message-Id: <3830B40E.237F9CE5@mail.cor.epa.gov>
SpewMuffin wrote:
>
> Problem: Display a gif from a given data.
>
> I have already organized the data so that it is ready for
> deploy. The only problem is that I can't figure out how
> to make perl create the gif. I have already installed
> gd v1.22, but the script's not recognizing that gd is
> installed when I use the 'use gd;' line.
First, Perl is case-sensitive, even on win32 boxes. So
you need to write this:
use GD;
instead of what you have above. Also, there is a matter
of a legalistic conglomerate pouncing on GIF-making
software. You may want to make PNG images instead.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 16 Nov 1999 01:51:15 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: gd.pm
Message-Id: <nM2Y3.183$Va.5337@nsw.nnrp.telstra.net>
On Tue, 16 Nov 1999 00:32:25 GMT,
SpewMuffin <spewmuffin@my-deja.com> wrote:
> Problem: Display a gif from a given data.
>
> I have already organized the data so that it is ready for
> deploy. The only problem is that I can't figure out how
> to make perl create the gif. I have already installed
> gd v1.22, but the script's not recognizing that gd is
> installed when I use the 'use gd;' line.
That's because it's
use GD;
Are you aware that GD versions 1.20 and up don't produce GIF anymore,
but PNG. This is a good thing.
Martien
--
Martien Verbruggen |
Interactive Media Division | We are born naked, wet and hungry.
Commercial Dynamics Pty. Ltd. | Then things get worse.
NSW, Australia |
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 1388
**************************************