[15713] in Perl-Users-Digest
Perl-Users Digest, Issue: 3126 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon May 22 18:11:43 2000
Date: Mon, 22 May 2000 15:10:25 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <959033425-v9-i3126@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 22 May 2000 Volume: 9 Number: 3126
Today's topics:
Re: Modules: using relative file paths to them <james@208.23.123.242>
Re: Modules: using relative file paths to them <apietro@my-deja.com>
Re: Modules: using relative file paths to them <rootbeer@redcat.com>
Re: Modules: using relative file paths to them <dmeyers@panix.com>
Re: more pattern matching questions <nospam@devnull.com>
Re: PERL and COM port <rootbeer@redcat.com>
Perl pipe, IO, open3 <cmahoney@indiana.edu>
Re: Perl problems under Solaris <rootbeer@redcat.com>
Re: Perl/Unix conflict with ";" in rsh <occitan@esperanto.org>
Re: pl2exe missing from ActivePerl <rootbeer@redcat.com>
Poll - IP voting timeouts......? (Cav)
Re: Poll - IP voting timeouts......? (Randal L. Schwartz)
Re: Poll - IP voting timeouts......? <rootbeer@redcat.com>
Re: Poll - IP voting timeouts......? (Cav)
Re: Poll - IP voting timeouts......? <rootbeer@redcat.com>
Re: PPM Packages - Documentation Issues <rootbeer@redcat.com>
Q: C-Forge? <thomas2@dalnet.se>
Q: Perl Editor for linux? <thomas2@dalnet.se>
Re: Q: Perl Editor for linux? <tony_curtis32@yahoo.com>
Re: Q: Perl Editor for linux? <glauber.ribeiroNOglSPAM@experian.com.invalid>
Re: question about CGI <rootbeer@redcat.com>
Re: read in a file and delete first 8 lines <dave@dave.org.uk>
Re: Recommendations on a Perl/MySQL book or chapter? (Bart Lateur)
Re: regexes *sigh* damn I hate these things <lr@hpl.hp.com>
Re: regexes *sigh* damn I hate these things (Abigail)
Re: regexes *sigh* damn I hate these things <Tbone@pimpdaddy.com>
Re: Reposting, can't retrieve my hash from an oher scri <rootbeer@redcat.com>
Re: rotation of images <rootbeer@redcat.com>
Re: run external command and re-direct output to a vari <kam_nospam@bgmm.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 22 May 2000 16:39:54 -0700
From: James Tolley <james@208.23.123.242>
Subject: Re: Modules: using relative file paths to them
Message-Id: <3929C54A.B4001034@208.23.123.242>
A Pietro wrote:
>
> But what if I am calling the module from another folder? I have tried:
>
> use ../MyModules::Config #trying a relative file path, no luck!
>
> Do I need to use push (@INC, '/home/development/test/MyModules') or
> something similar -- or is there a way to use relative file paths?
use lib '/my/site_perl';
# it's similar to: BEGIN { unshift @INC,'/my/site_perl' }
hth,
James
------------------------------
Date: Mon, 22 May 2000 21:54:07 +0100
From: "A Pietro" <apietro@my-deja.com>
Subject: Re: Modules: using relative file paths to them
Message-Id: <8gc6pl$a6u$1@sshuraaa-i-1.production.compuserve.com>
>use lib '/my/site_perl';
# it's similar to: BEGIN { unshift @INC,'/my/site_perl'
<
I don't follow.
What is /my/site_perl an absolute path to the module?
Thanks
AP
------------------------------
Date: Mon, 22 May 2000 14:43:11 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Modules: using relative file paths to them
Message-Id: <Pine.GSO.4.10.10005221442500.23375-100000@user2.teleport.com>
On Mon, 22 May 2000, A Pietro wrote:
> But what if I am calling the module from another folder?
Have you seen the 'lib' module? Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 22 May 2000 17:57:05 -0400
From: David Meyers <dmeyers@panix.com>
Subject: Re: Modules: using relative file paths to them
Message-Id: <yob4s7ql03y.fsf@panix2.panix.com>
Tom Phoenix <rootbeer@redcat.com> writes:
> On Mon, 22 May 2000, A Pietro wrote:
>
> > But what if I am calling the module from another folder?
>
> Have you seen the 'lib' module? Cheers!
Take a look at the lib module, but also, I think you might
be very interested in the FindBin module.
perldoc FindBin
--d
------------------------------
Date: 22 May 2000 20:50:22 GMT
From: The WebDragon <nospam@devnull.com>
Subject: Re: more pattern matching questions
Message-Id: <8gc6ie$qf8$0@216.155.33.83>
In article <8gaprs$fac$2@slb2.atl.mindspring.net>, ebohlman@netcom.com (Eric
Bohlman) wrote:
| : while (<SOMETHING>) {
| : $match = m|^([-\w\[\]\.]+)\.htm.?|;
| : print $match;
| : }
|
| In scalar context (like you have here), the m operator returns 1 if there
| was a match and 0 if there wasn't. In list context, it returns a list of
| parenthesis-grabbed matches; putting parens around $match in your second
| line will force list context, and since there's only one set of parens in
| your regex, that means the returned list will have either zero or one
| members.
thanks for the clarification.. I'll play with that idea for a bit and see what I
can come up with.
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: Mon, 22 May 2000 13:29:46 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: PERL and COM port
Message-Id: <Pine.GSO.4.10.10005221329030.23375-100000@user2.teleport.com>
On Sun, 21 May 2000 py1ll@my-deja.com wrote:
> Which script could I use to access (read and write) a COM port using
> PERL? I run under W98.
Do you mean 'script' or 'module'?
http://search.cpan.org/search?dist=Win32-SerialPort
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Mon, 22 May 2000 15:49:28 -0500
From: Clinton Mahoney <cmahoney@indiana.edu>
Subject: Perl pipe, IO, open3
Message-Id: <Pine.GSO.3.96.1000522153949.28529B-100000@steel4.ucs.indiana.edu>
I'm trying to use a perl script to send data to the Unix passwd
command to allow a perl script to use it to change a password.
It's not really important that that I'm using passwd - I've just
been trying to get anything to work to open a process with piped input.
I've been trying to use IPC open3 which doesn't work. I can't
even get this to work:
open (HANDLE, "| somecommand");
All it does is executes "somecommand" and doesn't even look at
whatever I try to write to HANDLE - it's just a completely uncontrolled
process.
I've even downloaded scripts people have already written and I get
the same thing. Such as :
open (MAIL, "| /usr/sbin/sendmail")
print MAIL "To: user@domain.com"
All I get is "user... Recipient names must be specified" which is
what you get when you invoke sendmail without any arguments.
This should be the easiest thing but I can't get it to work - I
didn't think I was an idiot but I guess I must be - please help!
I guess I'd prefer to use open3 since it would allow me to get
STDIN and STDOUT for the command - I'd really like to know how to do both.
-Clint
------------------------------
Date: Mon, 22 May 2000 14:35:23 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Perl problems under Solaris
Message-Id: <Pine.GSO.4.10.10005221429100.23375-100000@user2.teleport.com>
On Mon, 22 May 2000, Mark McWiggins wrote:
> II've had minor problems with Perl under Solaris since about version
> 5.004 ...
Maybe it's not properly configured or installed for your system. Or maybe
your system itself has problems; if your library routines are broken, Perl
(which relies upon those library routines) will be broken.
> Most annoying problem is that it dumps core in
>
> __do_global_dtors_aux()
What is that? I can't find that identifier in the Perl sources, although
maybe I missed it.
> I just downloaded and compiled "stable" 5.6 thinking it might not have
> this issue, but no: only 86% of the tests work and it dumps core (this
> same place) on './perl harness' to more closely inspect the tests.
Well, I'm pretty sure that not every Solaris user has such results! Have
you read through hints/solaris*? Probably the maintainers of that file
could give you better suggestions than I can. :-)
Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Mon, 22 May 2000 21:40:50 GMT
From: Daniel Pfeiffer <occitan@esperanto.org>
Subject: Re: Perl/Unix conflict with ";" in rsh
Message-Id: <8gc9h1$bat$1@nnrp1.deja.com>
In article <3928F051.D41CF8EF@ic.ac.uk>,
Michael Abramowski <m.abramowski@ic.ac.uk> wrote:
> Although
> rsh -l username 192.168.0.2 'HOME=/home/username/tmp; env'
> works fine from an interactive shell, I have trouble using a command
> like that in my Perl script, because Perl interprets the ";" as line
> end.
It sure doesn't care about a ; within a string! But I don't recognize
the above case below!
> Because the way it currently works, the new declaration of
> QSUB_WORKDIR only affects the line it is written
> in. Later lines just assume the original home directory, so that my
> output lands there (or not at all; in some versions of this script, it
> doesn't even find the input file):
> open REQ, "|qsub -x -eo -rs -r _$jobname-$filename -q $que" or die
> "Oops couldn't run qsub !";
> print REQ "cd \$QSUB_WORKDIR\n";
> print REQ "rcp $filename.$ext fred\@$ip:tmp/\n";
> print REQ "rsh -l fred $ip \'export
> QSUB_WORKDIR=/home/fred/tmp/\'\n";
> print REQ "rsh -l fred $ip \"$path$code\" $input $output\n";
> ...
> Is there any way to use multiple commands for an rsh at all? Even
> writing \; won't work - it just gives a whole page of error messages.
> Or should I post this to a Linux/UNIX newsgroup?
Yes to the latter question! I don't know what qsub does, but I'll just
assume you're executing these commands one after another. Then you
defnitely have a problem with rsh, because what that does is spawn a
subshell on the remote host. So you're doing the export in one shell,
and the $path$code thing in another. What I've used in such a case is
system 'rsh', ..., q{
remote-cmd1;
remote-cmd2;
...
};
allowing you to embed a little remote shell-script into your Perl code.
Use qq to interpolate variables, but then beware of $ or @ which you
want to pass.
Daniel
--
Bring text-docs to life! Erwecke Textdokumente zum Leben!
http://beam.to/iPerl/
Vivigu tekstodokumentojn!
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 22 May 2000 11:23:07 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: pl2exe missing from ActivePerl
Message-Id: <Pine.GSO.4.10.10005221122390.23375-100000@user2.teleport.com>
On Mon, 22 May 2000, Tk Soh wrote:
> I have been looking for the pl2exe utility which, per the FAQ, should be
> bundled with the installation,
Can you tell me where in the FAQ you read this?
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 22 May 2000 18:34:27 GMT
From: caviatte@aol.comNoSpam (Cav)
Subject: Poll - IP voting timeouts......?
Message-Id: <20000522143427.04072.00001337@ng-ch1.aol.com>
HI all,
I gotta say - I love this perl stuff !!
I've been designing web pages for quite some time now, and have just recenly
started writing my own scripts (rather than using the "canned" jobs to get even
simple tasks accomplished) --- there's much more satisfaction in this, and its
great for practice. Anyhoo - here's my dilemma:
I've written a simple poll script (that actually works - hehe) where visitors
can vote on which roller coaster video they would like to see on our "Weekly
Coaster Video Download". It's turned out to be a very fun "hook" for the site
- and participation is better than I expected. But - there is a problem, there
are a few jokers who sit on that vote button and log several hundred votes in a
row.
==================================
I need to code a routine into the script that logs the IP address of the voter,
and sets a "timeout" of sorts - say......60 minutes..... during which time, no
votes can be tallied from that IP address, then after 60 minutes, allow another
vote from that IP.
==================================
I certainly hope this is making sense - If anyone can help, I would REALLY
appreciate it. I can't find anything in all 8 of my books that would suggest
how to go about doing this. Logging the IP and the time that vote came through
is not a problem, ...... but checking that time against some other variable in
order to set this "timeout" is what's got my scalp raw from all the head
scratching.
A sample of this poll is at:
http://rct.prohosting.com/polltest.html
Thanks a bunch!!!!
>>> Cav <<<
Cav's Roller Coaster Tycoon Depot
http://rct.prohosting.com
PLEASE STOP BY FOR A VISIT
------------------------------
Date: 22 May 2000 12:03:50 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Poll - IP voting timeouts......?
Message-Id: <m1og5yz9t5.fsf@halfdome.holdit.com>
>>>>> "Cav" == Cav <caviatte@aol.comNoSpam> writes:
Cav> I need to code a routine into the script that logs the IP address
Cav> of the voter, and sets a "timeout" of sorts - say......60
Cav> minutes..... during which time, no votes can be tallied from that
Cav> IP address, then after 60 minutes, allow another vote from that
Cav> IP.
No. Repeat after me:
an IP address is not a user
an IP address is not a user
an IP address is not a user
Some counterexamples:
An AOL user comes in from different IP addresses on *every* hit.
A corporate proxy makes many users appear to have the same IP.
Do *not* use IP addresses as a "per-user" accounting mechanism. Ever.
Go hunt around in comp.infosystems.www.authoring.cgi for more
information. It's not a Perl issue at this point.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Mon, 22 May 2000 12:17:36 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Poll - IP voting timeouts......?
Message-Id: <Pine.GSO.4.10.10005221215160.23375-100000@user2.teleport.com>
On 22 May 2000, Cav wrote:
> there is a problem, there are a few jokers who sit on that vote button
> and log several hundred votes in a row.
Not much you can do about that.
> I need to code a routine into the script that logs the IP address of the voter,
What about people who use proxies? Do you allow only one AOL user to vote?
What about people who share a computer? Do you allow only one vote for my
entire family?
Of course, there's nothing Perl-specific about this. If you have more
questions, comp.infosystems.www.authoring.cgi may be a place to check.
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 22 May 2000 19:53:57 GMT
From: caviatte@aol.comNoSpam (Cav)
Subject: Re: Poll - IP voting timeouts......?
Message-Id: <20000522155357.15383.00000616@ng-df1.aol.com>
Randal L. Schwartz <merlyn@stonehenge.com> wrote in message
news:m1og5yz9t5.fsf@halfdome.holdit.com...
>> No. Repeat after me:
an IP address is not a user
an IP address is not a user
an IP address is not a user
Some counterexamples:
An AOL user comes in from different IP addresses on *every* hit.
A corporate proxy makes many users appear to have the same IP.
Do *not* use IP addresses as a "per-user" accounting mechanism. Ever.
Go hunt around in comp.infosystems.www.authoring.cgi for more
information. It's not a Perl issue at this point<<
==================================
Hi All,
OK, lets try it this way:..........
1.) A perl script is activated
2.) Upon activation (or access) - the TIME that the script was "hit" is
logged somewhere, and PAGE 1 is displayed.
3.) If the script is accessed again within 60 minutes time (doesn't matter
by whom), PAGE 2 is displayed.
4.) After 60 minutes from last access, if the script is hit again, PAGE 1
displays
----and so on and so forth.
Thanks again for any help,
>>> Cav <<<
Cav's Roller Coaster Tycoon Depot
http://rct.prohosting.com
PLEASE STOP BY FOR A VISIT
------------------------------
Date: Mon, 22 May 2000 14:56:35 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Poll - IP voting timeouts......?
Message-Id: <Pine.GSO.4.10.10005221444410.23375-100000@user2.teleport.com>
On 22 May 2000, Cav wrote:
> OK, lets try it this way:..........
>
> 1.) A perl script is activated
> 2.) Upon activation (or access) - the TIME that the script was "hit" is
> logged somewhere, and PAGE 1 is displayed.
> 3.) If the script is accessed again within 60 minutes time (doesn't matter
> by whom), PAGE 2 is displayed.
> 4.) After 60 minutes from last access, if the script is hit again, PAGE 1
> displays
> ----and so on and so forth.
Okay; that's easy to do.
One way would be like this pseudo-code, which looks surprisingly like
Perl code:
my $access_file = '/tmp/.i_was_accessed';
my $last_access = -M $access_file;
if (defined $last_access and $last_access > 1/24) {
# Not accessed during the past hour, probably
touch $access_file; # or otherwise ensure the m-time is set
output PAGE 1;
} else {
# We've been accessed too recently
output PAGE 2;
}
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Mon, 22 May 2000 11:09:46 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: PPM Packages - Documentation Issues
Message-Id: <Pine.GSO.4.10.10005221109110.23375-100000@user2.teleport.com>
On Sun, 21 May 2000, The Evil Beaver wrote:
> I am currently creating a PPM package for a Perl module. I've copied the
> instructions of the PPM FAQ on making packages, but for the life of me
> cannot get the documentation for the module to show up in the menu. I can't
> find anything on making packages outside the PPM FAQ, so if anyone has any
> experience putting together these packages, HELP!
You should probably write the maintainer of the PPM FAQ to suggest that
this information be included. Thanks!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Mon, 22 May 2000 20:08:50 GMT
From: "Thomas Åhlen" <thomas2@dalnet.se>
Subject: Q: C-Forge?
Message-Id: <mtgW4.20$Dj2.4619@dummy.bahnhof.se>
Well searching some more and i found this one which looks really nice.
Since it is commercial i can't donwload it and try it in Perl mode.
Anyone with perl coding experiance using this editor/IDE?
http://www.codeforge.com/
-Thomas Å
------------------------------
Date: Mon, 22 May 2000 19:55:46 GMT
From: "Thomas Åhlen" <thomas2@dalnet.se>
Subject: Q: Perl Editor for linux?
Message-Id: <6hgW4.19$Dj2.4544@dummy.bahnhof.se>
Well not a coding question but better to ask it in a group with perl
programmers than
in a linux group i think.
Today i develop all my perl code in UltraEdit a really nice editor with lots
of
functionality(www.ultraedit.com). I work directly on my samba mounted linux
server.
I am about to change my operatingsystem on my workstation to linux and have
to find an
replacement for UltraEdit. I have searched some but havent really found one
yet.
Anyone got any suggestions to a similar program on linux.
-Thomas Å
------------------------------
Date: 22 May 2000 14:59:01 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Q: Perl Editor for linux?
Message-Id: <87n1lijr0a.fsf@limey.hpcc.uh.edu>
>> On Mon, 22 May 2000 19:55:46 GMT,
>> "Thomas Åhlen" <thomas2@dalnet.se> said:
> Well not a coding question but better to ask it in a
> group with perl programmers than in a linux group i
> think.
> Today i develop all my perl code in UltraEdit a really
> nice editor with lots of
> functionality(www.ultraedit.com). I work directly on my
> samba mounted linux server.
http://www.perl.com/reference/query.cgi?editors
has a big list-o-suggestions. (I use GNU Emacs +
cperl-mode, FWIW.)
hth
t
------------------------------
Date: Mon, 22 May 2000 12:58:28 -0700
From: glauber <glauber.ribeiroNOglSPAM@experian.com.invalid>
Subject: Re: Q: Perl Editor for linux?
Message-Id: <02e57f98.fd86068f@usw-ex0104-026.remarq.com>
The usual suspects:
Vim - http://www.vim.org
Emacs - http://www.emacs.org
These are very different editors, so most people will like one
and hate the other.
glauber
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
------------------------------
Date: Mon, 22 May 2000 12:06:33 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: question about CGI
Message-Id: <Pine.GSO.4.10.10005221205330.23375-100000@user2.teleport.com>
On Mon, 22 May 2000, Felix wrote:
> Subject: question about CGI
Perhaps you want to search for the docs, FAQs, and newsgroups about the
Common Gateway Interface and how to write programs for it. Reading the
newsgroup comp.infosystems.www.authoring.cgi may be helpful. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Mon, 22 May 2000 19:09:01 +0100
From: Dave Cross <dave@dave.org.uk>
Subject: Re: read in a file and delete first 8 lines
Message-Id: <bstiis03v68huvv5h8sq49ds7kqtagc36g@4ax.com>
On 22 May 2000 12:09:52 -0500, Tony Curtis <tony_curtis32@yahoo.com>
wrote:
>>> On Mon, 22 May 2000 11:41:52 -0500,
>>> "Clemmons, David [NGC:B995:EXCH]" <clemmons@nSoPrAtMelnetworks.com> said:
>
>> I need to read in a html file, then delete the first 8
>> lines (html tags) of the file. I also want to delete
>> the last two html tags. The files that I will be
>> reading in, were previously saved by another script I
>> wrote... so I know exactly what the files will look
>> like.
>
>Deleting the first 8 lines is probably best done something
>like this:
>
> my $file = '/etc/passwd';
>
> open P, $file or die "Couldn't open $file: $!\n";
>
> while (<P>) {
> next if $. <= 8;
> print;
> }
>
> close P;
Or maybe
open P, $file or die "Couldn't open $file: $!\n";
while (<P>) {
print unless 1 .. 8;
}
hth,
Dave...
--
<http://www.dave.org.uk> SMS: sms@dave.org.uk
yapc::Europe - London, 22 - 24 Sep <http://www.yapc.org/Europe/>
"There ain't half been some clever bastards" - Ian Dury [RIP]
------------------------------
Date: Mon, 22 May 2000 19:43:40 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Recommendations on a Perl/MySQL book or chapter?
Message-Id: <392a8c1e.999909@news.skynet.be>
Jonathan Stowe wrote:
>> George Reese
>
>Splutter, splutter ...
Yes indeed. This has been brought up before, and even the infamous G.R.
himself wrote that he is the same person.
Anyway, what I found striking is that the user's comments on the book,
the reviews get worse with time. There was a real sense of euphoria at
the beginning (see bottom of page), but later on, people wrote nasty
things like "nothing but a paperweight".
<http://www.oreilly.com/comments/msql.html>
--
Bart.
------------------------------
Date: Mon, 22 May 2000 12:46:10 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: regexes *sigh* damn I hate these things
Message-Id: <MPG.13932e61efc4c80498aaaf@nntp.hpl.hp.com>
In article <8gapbe$plj$2@216.155.32.48> on 22 May 2000 07:58:38 GMT, The
WebDragon <nospam@devnull.com> says...
> In article <3928C898.116B9DFD@stomp.stomp.tokyo>, "Godzilla!"
> <godzilla@stomp.stomp.tokyo> wrote:
>
> | The WebDragon wrote:
> |
> | > "Godzilla!" <godzilla@stomp.stomp.tokyo> wrote:
> |
> | > Just curious, but is there any particular reason
> | > your linewrapping is so short?
> |
> | Yes there is a reason. Is there a reason
> | your lines are so long?
>
> dunno about 'so long' as 80 cols is fairly standard, no?
No. It is better to use 72 columns, so quoting -- even twice -- doesn't
cause ugly unintended rewrappings.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 22 May 2000 20:03:52 GMT
From: abigail@foad.org (Abigail)
Subject: Re: regexes *sigh* damn I hate these things
Message-Id: <slrn8ij4l8.1bm.abigail@ucan.foad.org>
On 21 May 2000 01:57:34 GMT, The WebDragon <nospam@devnull.com> wrote:
++ ok, I need help creating a regex to extract a number from a bit of html
If you need to do any general HTML parsing, you shouldn't use a regex.
++ here's a snip of the html
++
++ <p>Name: <a href="http://www.planetunreal.com/dl/nc.asp?nalicity/
++ utdm/dm-distinctive.zip">DM-Distinctive</a><br>
++ Author:<a href="mailto:bastiaan_frank@hotmail.com">Bastiaan Frank</a><br>
++ Rating: (1-10) 9.5</p><!-- add correct image name below here -->
++ <img align="right" border="0" hspace="10" vspace="10" width="231" height="173
++ src="dm-distinctive.jpg">
++
++
++ I need to extract the number AFTER the Rating: (1-10) and before the </p>, wh
++ can be any number from 0 to 10 in .5 increments
++
++ there may be a 0, or an 8.5 or a 10 or a 5 or a 5.5 etc.
++
++ I need ONLY that number.
That seems extremely trivial, and has nothing to do with HTML:
m{Rating: \(1-10\) (\d(?:\.5)?|10)</p>}
Abigail
------------------------------
Date: 22 May 2000 21:52:58 GMT
From: Intergalactic Denizen of Mystery <Tbone@pimpdaddy.com>
Subject: Re: regexes *sigh* damn I hate these things
Message-Id: <8gca7q$1t42$1@news.enteract.com>
godzilla@stomp.stomp.tokyo writes:
>The WebDragon wrote:
>> "Godzilla!" <godzilla@stomp.stomp.tokyo> wrote:
>> | The WebDragon wrote:
>> | > "Godzilla!" <godzilla@stomp.stomp.tokyo> wrote:
This bonding is bringing tears to my eyes
------------------------------
Date: Mon, 22 May 2000 14:41:22 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Reposting, can't retrieve my hash from an oher script
Message-Id: <Pine.GSO.4.10.10005221438460.23375-100000@user2.teleport.com>
On Mon, 22 May 2000, Vincent wrote:
> I already posted this problem but didn't get any answer.
You didn't wait long enough.
> So, in brief, my hash do exist because I can print it when I restart Apache,
> but 5 seconds after when an other script try to retrieve the information
> from this hash it says that this hash is empty.
I suspect that your hash exists in one invocation of Apache, but not in
another. Or maybe it's been discarded - search for the docs, FAQs, and
newsgroups about Apache.
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Mon, 22 May 2000 13:32:08 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: rotation of images
Message-Id: <Pine.GSO.4.10.10005221330520.23375-100000@user2.teleport.com>
On 22 May 2000 td@lavalink.com.au wrote:
> I was wondering if anyone knows if GD.pm can
> rotate and existing image.
I think it _can_ do that, but it wouldn't be easy. :-)
> If not, does anyone know of a module or a simple
> way to rotate a list of images?
I think you want PerlMagick.
http://search.cpan.org/search?dist=PerlMagick
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Mon, 22 May 2000 19:26:23 GMT
From: kam <kam_nospam@bgmm.com>
Subject: Re: run external command and re-direct output to a variable?
Message-Id: <392987DB.A07D0FD7@bgmm.com>
We were following one of the FAQ's using backticks and it wasn't working
Now it does:
$output_string = `@progArg`;
Thanks for the confirmation.
Regards,
Paul R. Andersen wrote:
> kam wrote:
> >
> > This is code snip that we're using. We're able to successfully
> > re-direct the information to the
> > file define by $displaydatafile, which is a file.
> >
> > my @progArg = ("$executable", "$index", "$license", "$qArg",
> > "$pipeout", "$displaydatafile");
> > system("@progArg") == 0 || die "system @progArg failed: $?";
> >
> > We're read some of the FAQ's but haven't found any good hints. Is there
> > a way of capturing
> > this to a Variable instead of outputting to a file and then having to
> > input the information?
> >
> > Any thoughts would be appreciated. Our platform is Windows NT 4.0.
> >
> > Regards,
>
> If you execute things with backticks you can capture output
>
> $CmdRet = `$executable $arg1`;
>
> will put the output of the executable in $CmdRet and you can display it
> or write to a file or whatever.
> --
> Paul Andersen
> -- I can please only ONE person per day.
> -- Today is NOT your day.
> -- Tomorrow isn't looking good either.
------------------------------
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 3126
**************************************