[10380] in Perl-Users-Digest
Perl-Users Digest, Issue: 3973 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 14 14:07:18 1998
Date: Wed, 14 Oct 98 11:00:21 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 14 Oct 1998 Volume: 8 Number: 3973
Today's topics:
Re: Are there any "perl.newbie" group or forum? (Abigail)
Re: Are there any "perl.newbie" group or forum? droby@copyright.com
Re: Compiling perl 5.005_02 on Dynix/ptx 4.2.3 (Tye McQueen)
Cool company has Perl jobs! versuslaw@my-dejanews.com
Re: Creating an unreadable perl executable (Abigail)
does format behave like FORTAN FORMAT? It seems to.. <emills@harris.com>
Re: encryption (John Stanley)
Re: encryption (Larry Rosler)
Re: Equivalent of "unload" after "require"? wyndo@cxo.com
Re: fcntl <rootbeer@teleport.com>
Re: Help! <rootbeer@teleport.com>
Re: Help! <mark@uninetwork.com>
Re: London.pm - Changed URL (Adam Turoff)
Re: need help with an interactive gannt chart (Adam Turoff)
Re: Newbie needs help transposing two words in a file <aqumsieh@tigre.matrox.com>
Re: Newbie needs help transposing two words in a file (Larry Rosler)
Re: Passing objects in Perl <eashton@bbnplanet.com>
Re: Perl Cookbook - is this the best perl book? (Abigail)
Re: Perl Cookbook - is this the best perl book? (Abigail)
Re: Perl object - why does this fail? <dlhawley@user2.teleport.com>
Re: Perl object - why does this fail? (Larry Wall)
Re: Perl on NT questions <rootbeer@teleport.com>
Re: perlQt: error in loading shared libraries <rootbeer@teleport.com>
Re: Sending mail via CGI/Perl ? <aperrin@mcmahon.qal.berkeley.edu>
Re: Sending mail via CGI/Perl ? <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: sorting hack (Abigail)
struggling with a regex... HEeeeelp! <davemee@tvlistings.co.uk>
Re: struggling with a regex... HEeeeelp! (Mike Stok)
system calls (Rick Bauman)
Using $ENV{REMOTE_USER} (Alfredo Dematteis)
Using Package Manager from the Win32 RK <alext@cri-boi.nospam.com>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 14 Oct 1998 16:03:32 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Are there any "perl.newbie" group or forum?
Message-Id: <702i0k$v6$1@client3.news.psi.net>
Matt Curtin (cmcurtin@interhack.net) wrote on MDCCCLXX September MCMXCIII
in <URL:news:xlxr9wbfiev.fsf@gold.cis.ohio-state.edu>:
++ abigail@fnx.com (Abigail) writes:
++
++ > I'd prefer using Java over C, but neither would be my choice. I would
++ > go for either something from the school of Wirth (Pascal, Modula), LPC
++ > or maybe even some pseudo code.
++
++ Interesting.
++
++ LPC, as in the language of LPmud?
Yes.
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
------------------------------
Date: Wed, 14 Oct 1998 16:18:55 GMT
From: droby@copyright.com
Subject: Re: Are there any "perl.newbie" group or forum?
Message-Id: <702itf$fm3$1@nnrp1.dejanews.com>
In article <yl7ly554i7.fsf@windlord.stanford.edu>,
Russ Allbery <rra@stanford.edu> wrote:
> Mark-Jason Dominus <mjd@op.net> writes:
> > Russ Allbery <rra@stanford.edu> wrote:
>
> >> Perl isn't that good of a language to learn how to program in (yes, I
> >> know some people with strong qualifications disagree with me on that
> >> score...).
>
> > Really? Who disagrees?
>
> > I ask because I've never actually seen anyone express that opinion, and
> > I've often wanted to try it and see what the result was.
>
> I seem to remember bringing it up before and having at least one person
> with a solid background in Perl training disagree with me. But I can't
> remember any more specifics than that.
>
> Perl not being a good first language seems practically self-evident to me,
> so I'm not sure how well I can argue the point. Of course, I personally
> followed the semi-traditional programming learning track of the 80s (BASIC
> to Pascal to C to a wide smattering of stuff ranging from LISP to shell to
> COBOL, and then finally Perl).
>
Similarly though in the previous decade, I learned (and have since happily
forgotten) Fortran, Univac Exec-8 Assembler, Algol, APL, SNOBOL. I'm not
convinced this is an improvement over what you could get starting with Perl,
as long as you start with baby steps. The really important thing is to have
some sense of logic, and an ability to understand what you need to do
thinkning in something close to a natural language.
Since he seems to poke his head in a bit lately, I'm hoping to hear some
commentary from Larry on this question. Might be quote-file fodder. But
failing that, ...
"The fact is, your brains are built to do Perl programming. You have a deep
desire to turn the complex into the simple, and Perl is just another tool to
help you do that--just as I am using English right now to try to simplify
reality. I can use English for that because English is a mess.
"This is important, and a little hard to understand. English is
useful because it's a mess. Since English is a mess, it maps well onto the
problem space, which is also a mess, which we call reality. Similarly, Perl
was designed to be a mess (though in the nicest of possible ways)."
-- Larry Wall
2nd State of the Onion Address
--
Don Roby
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 14 Oct 1998 12:04:03 -0500
From: tye@fumnix.metronet.com (Tye McQueen)
Subject: Re: Compiling perl 5.005_02 on Dynix/ptx 4.2.3
Message-Id: <702li3$b7h@fumnix.metronet.com>
doyle@aps.org (Mark Doyle) writes:
)
) We are trying to compile perl 5.005_02 on a Sequent machine running Dynix/ptx
) 4.2.3 and everything seems to go fine except for the lib/io_sel.t test which
) indicates a problem with the 4-argument select.
) Specifically, it begins to fail at test number 11. Has anybody run into this
) or otherwise successfully compiled 5.005_02 on this platform? Suggestions
) welcome... Our configuration is just what ./Configure -des supplies.
On SVR4 select() is often not detectable via nm(1) so you copy
of Perl may have been built thinking that you did not have a
version of select().
The out-of-date http://www.metronet.com/~tye/perlsvr4.html may
be of some help here.
Try configuring without using nm(1) [using cc(1) to build test
programs instead].
--
Tye McQueen Nothing is obvious unless you are overlooking something
http://www.metronet.com/~tye/ (scripts, links, nothing fancy)
------------------------------
Date: Wed, 14 Oct 1998 17:19:57 GMT
From: versuslaw@my-dejanews.com
Subject: Cool company has Perl jobs!
Message-Id: <702mft$la3$1@nnrp1.dejanews.com>
Well-established Internet company seeks entry-level and experienced Perl
programmers. We are looking for a smart, self-starters who write good code!
Our systems run in a Windows NT environment, using ActiveState perl.
You will be writing scripts and modules that use OOP, require database
interactivity (ADO/SQL).
Desired Skills:
Perl 5.x & object oriented Perl experience, NT/Win32. Understand Internet
protocols and HTML, as well as database issues (SQL, OLE-DB/ADO).
We are an equal opportunity employer based in Redmond, Washington. Please
email your resume and letter of interest to jobs@versuslaw.com. You may
attach your resume in rich text format, plain text format, or as a word
document. We are a legal publishing company -- check out our web site:
http://www.versuslaw.com for more information.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 14 Oct 1998 17:03:51 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Creating an unreadable perl executable
Message-Id: <702lhn$3kn$3@client3.news.psi.net>
Zenin (zenin@bawdycaste.org) wrote on MDCCCLXX September MCMXCIII in
<URL:news:908324517.643137@thrush.omix.com>:
++
++ Another option is putting the file on a filesystem mounted read
++ only so that even root can't change the flags, however root
++ could still remount the filesystem. Even a read only medium
++ such as a CDROM won't work as it could simply be mounted as
++ a union file system, or if that isn't supported it could read
++ the raw device.
NFS mount it, with flags set that root has no write permission on
the mounted device. Of course, root on the box that has the disk
still can change the permissions....
Abigail
--
perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle'print +(HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET", "http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content)) =~ /(.*\))[-\s]+Addition/s) [0]'
------------------------------
Date: Wed, 14 Oct 1998 13:32:37 -0400
From: Ed <emills@harris.com>
Subject: does format behave like FORTAN FORMAT? It seems to..
Message-Id: <3624E035.36076AD3@harris.com>
It seems that the interpreter is ignoring logic about format statements,
and uses the last one encountered (much like FORTRAN which treats FORMAT
as uncompiled statements). I tried something like:
if (x)
{$a=1;
format STDOUT
cat @#
$a
.
} else
{$a=2;
format STDOUT
dog @#
$a
.
}
write(STDOUT);
.
.
This isn't my actual case, so there may be typos, but the logic flow for
this example is
if x is TRUE, $a is 1, and the SECOND format is used! (dog 1)
if x is FALSE, $a is 2, and again the second format is used. (dog 2)
However, if I make a slight change:
if (x)
{$~ = "ONE";
$a=1;
format ONE
cat @#
$a
.
} else
{$~ = "TWO";
$a=2;
format TWO
dog @#
$a
.
}
write(STDOUT);
Everything works fine- I get either format ONE (cat 1) or TWO (dog 2)
according to the logic.
Strange? Seems like it. According to my perl text, if () {} else {} else
"executes" everything within the curly brackets according the logic.
Maybe "executes" is the key here- as I said, format isn't executable
perhaps? Even it not, its still strange that the system even encountered
the statement.
E
------------------------------
Date: 14 Oct 1998 17:09:18 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: encryption
Message-Id: <702lru$q1i$1@news.NERO.NET>
In article <slrn728gsa.9ao.sholden@pgrad.cs.usyd.edu.au>,
Sam Holden <sholden@cs.usyd.edu.au> wrote:
>On 13 Oct 1998 21:18:21 GMT, John Stanley <stanley@skyking.OCE.ORST.EDU> wrote:
>>But it is damn effective on those first 8.
>>
>>You could always operate on the sentences 8 characters at a time.
>
>Of course it would then be a little hard to decrypt the text afterwards...
Decryption was not part of the problem statement.
------------------------------
Date: Wed, 14 Oct 1998 10:53:09 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: encryption
Message-Id: <MPG.108e84dcf032d03898980d@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <702lru$q1i$1@news.NERO.NET> on 14 Oct 1998 17:09:18 GMT, John
Stanley <stanley@skyking.OCE.ORST.EDU> says...
> In article <slrn728gsa.9ao.sholden@pgrad.cs.usyd.edu.au>,
> Sam Holden <sholden@cs.usyd.edu.au> wrote:
> >On 13 Oct 1998 21:18:21 GMT, John Stanley <stanley@skyking.OCE.ORST.EDU> wrote:
> >>But it is damn effective on those first 8.
> >>You could always operate on the sentences 8 characters at a time.
> >Of course it would then be a little hard to decrypt the text afterwards...
> Decryption was not part of the problem statement.
Orlando Frooninckx <Frook@mail.dma.be> wrote:
! does anyone have a nice encryption function example so I can crypt
! sentences before writing them to a file?
As Michael Gebis proposed, if you are just writing them to a file but
can't decrypt them, you might as well use 'unlink' (and save the disk
space).
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 14 Oct 1998 17:43:02 GMT
From: wyndo@cxo.com
Subject: Re: Equivalent of "unload" after "require"?
Message-Id: <702nr6$nof$1@nnrp1.dejanews.com>
> Or (more normal) put the code into a subroutine, `require' it once
> when the program starts up, and then call the subroutine when you want
> to call the subroutine.
[grin] that's exactly what I'm doing. I put the code into a subroutine & call
it when I need to run it. The problem is, I require the file.... I change the
file.... so when I re-run that subroutine, my saved changes don't take effect
because it's running the program as it was on startup, not including the
changes I saved. What I needed was a way to require the file, then re-require
it so that any changes made to the file would be picked up the 2nd time
around. I got the solution in Email (which I haven't tested yet, but it looks
good) to first do "delete $INC{'whatever_file_i_required'};" before requiring
it again the 2nd time.
Also, I'm not familiar with the "do" command (I'm by all means still only a
beginner when it comes to Perl). "do" is like "require" ?
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 14 Oct 1998 16:14:54 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: fcntl
Message-Id: <Pine.GSO.4.02A.9810140913310.1979-100000@user2.teleport.com>
On Wed, 14 Oct 1998, Charlene Abrams wrote:
> I can't get fcntl to lock my file and have no idea why.
Why aren't you using flock? It's more portable. (When you use flock, Perl
will use whichever method your system uses for file locking, whether
that's fcntl or not.) Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 14 Oct 1998 17:18:24 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Help!
Message-Id: <Pine.GSO.4.02A.9810140915350.1979-100000@user2.teleport.com>
On Wed, 14 Oct 1998, _cim_ wrote:
> Subject: Help!
Please check out this helpful information on choosing good subject
lines. It will be a big help to you in making it more likely that your
requests will be answered.
http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post
> I need it to check if </P> is among the 300 first chars. and if not
> then only get all text up to char number 300.
Use substr, as documented in perlfunc. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 14 Oct 1998 13:24:09 -0400
From: Mark Cain <mark@uninetwork.com>
To: _cim_ <cim@online.ee>
Subject: Re: Help!
Message-Id: <3624DE39.46B14767@uninetwork.com>
_cim_ wrote:
> I use this:
>
> ($final = $INPUT{update}) =~ s!</P>.*!!s;
>
> to get all text up to the point when </P> appears.
>
> I need it to check if </P> is among the 300 first chars. and if not
> then only get all text up to char number 300.
#return the first 300 characters of $final
#if $final is less than 300 characters, perl will not complain
$final=substr($final,0,300)
------------------------------
Date: 14 Oct 1998 12:14:58 -0400
From: ziggy@panix.com (Adam Turoff)
Subject: Re: London.pm - Changed URL
Message-Id: <702im2$36b@panix.com>
Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com> wrote:
>David Adler wrote:
>> Hey, I would have bought you a beer last time you were in nyc, but I
>> felt that I should not contribute to you running aground in the wilds
>> of Jersey... :-)
>
>Er, Philly is in Pennsylvania the last I checked darling :).
Exactly. Jersey is just in the way sometimes. All the time, actually. :-)
>> Try us! :-)
>
>Quod erat demonstrondem. :)
First, define beer. Second, does the distillation process necessarily
remove a beer's 'beerness'?
Z.
------------------------------
Date: 14 Oct 1998 12:20:58 -0400
From: ziggy@panix.com (Adam Turoff)
Subject: Re: need help with an interactive gannt chart
Message-Id: <702j1a$3g2@panix.com>
Tom Phoenix <rootbeer@teleport.com> wrote:
>On Tue, 13 Oct 1998, Webmaster wrote:
>
>> Can anyone help me, please reply in this newgroup
>
>Sure, I can help you. For people who ask questions like this, my standard
>rate is $250 per hour. The good news is that this first minute is free.
>Now, what help do you need?
His watch or yours, Tom? :-)
Z.
------------------------------
Date: 14 Oct 1998 10:59:31 -0400
From: Ala Qumsieh <aqumsieh@tigre.matrox.com>
Subject: Re: Newbie needs help transposing two words in a file
Message-Id: <x3y4st7w5nw.fsf@tigre.matrox.com>
lr@hpl.hp.com (Larry Rosler) writes:
>
> D'uh. Yes, I knew that. Maybe I was being too subtle. I was trying to
> hit Ala (who posts too often before he thinks) over the head about sound
I agree that I did that quite often in the past... but I would say
over 90% of the time I test my posts. Maybe I should make that 110% of
the time. Maybe also I should start using Benchmark (which I never used
before to be honest).
> methodology. His response (if any) should be interesting. (His e-mail
> address is bogus, BTW.)
Now that statement is bogus .. I am not trying to hide myself by any
means .. I have actually received many emails from people posting to
this group. Let me give you a taste of your own medicine now ..
Did you even try to email me before stating the above statement ?? Did
you "think before you posted" ? ;)
I am really curious to know how you came to this conclusion!
(just in case .. I don't know which email address you're talking
about, but mine is:
aqumsieh@matrox.com or
ala.qumsieh@matrox.com
)
by the way, no hard feelings .. I will use your comments to improve
the quality of my responses.
Thanks,
Ala
--
Ala Qumsieh | No .. not Just Another
ASIC Design Engineer | Perl Hacker!!!!!
Matrox Graphics Inc. |
Montreal, Quebec | (Not yet!)
------------------------------
Date: Wed, 14 Oct 1998 09:32:36 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Newbie needs help transposing two words in a file
Message-Id: <MPG.108e7200a4b19f519898b7@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed, but not to the bogus
address in the headers -- to one of the two stealth addresses in the
message quoted below.]
In article <x3y4st7w5nw.fsf@tigre.matrox.com> on 14 Oct 1998 10:59:31 -
0400, Ala Qumsieh <aqumsieh@tigre.matrox.com> says...
> lr@hpl.hp.com (Larry Rosler) writes:
...
> > (His e-mail address is bogus, BTW.)
>
> Now that statement is bogus .. I am not trying to hide myself by any
> means .. I have actually received many emails from people posting to
> this group. Let me give you a taste of your own medicine now ..
> Did you even try to email me before stating the above statement ?? Did
> you "think before you posted" ? ;)
> I am really curious to know how you came to this conclusion!
>
> (just in case .. I don't know which email address you're talking
> about, but mine is:
> aqumsieh@matrox.com or
> ala.qumsieh@matrox.com
> )
I am talking about the email address that your newsreader puts into the
headers of your messages, the address that is at the top of this message,
the address that just bounced a message for the second time since
yesterday. That address is aqumsieh@tigre.matrox.com which is neither of
the two that you show above.
I am offended by your tone and by your implication that I would be
hypocritical about exempting myself from testing before posting.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 14 Oct 1998 16:04:44 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: Passing objects in Perl
Message-Id: <3624C91B.D4342D84@bbnplanet.com>
Stefanos Kiakas wrote:
> How do I pass objects as parameters to other objects in Perl, and have
> the passed object respond to methods? Is it possible to do this with Perl?
> Where can I find sample code?
You might try 'perldoc perltoot'.
e.
After all, the cultivated person's first duty is to
always be prepared to rewrite the encyclopedia. - U. Eco -
------------------------------
Date: 14 Oct 1998 16:13:52 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl Cookbook - is this the best perl book?
Message-Id: <702ik0$v6$2@client3.news.psi.net>
Larry Rosler (lr@hpl.hp.com) wrote on MDCCCLXX September MCMXCIII in
<URL:news:MPG.108d918dd16d21c698980c@nntp.hpl.hp.com>:
++ [Posted to comp.lang.perl.misc and a copy mailed.]
++
++ In article <700km0$7p214@mercury.adc.com> on 13 Oct 1998 22:36:48 GMT,
++ Brand Hilton <bhilton@tsg.adc.com> says...
++ ...
++ > FWIW, the grep uses slightly less CPU if you don't put brackets around
++ > the regex.
++
++ Why would anyone prefer the BLOCK form of grep or map to the EXPR form,
++ if the EXPR form would do the job?
I always, always, always use the BLOCK form. It's easier changed than
going from EXPR to BLOCK and then maybe back to EXPR again.
++ Is there an emoticon that says that this is a serious question? More
++ than just style and TMTOWTDI is involved, because of the minor
++ performance implication (which I have noted also in the past).
This kind of performance enhancement should be done by perl, not
by the programmer. Perl is supposed to help the programmer.
Abigail
--
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi
------------------------------
Date: 14 Oct 1998 16:53:25 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl Cookbook - is this the best perl book?
Message-Id: <702ku5$3kn$1@client3.news.psi.net>
Brand Hilton (bhilton@tsg.adc.com) wrote on MDCCCLXX September MCMXCIII
in <URL:news:701dgi$7p121@mercury.adc.com>:
++ In article <beUU1.1642$fS.4920016@news.itd.umich.edu>,
++ Sean McAfee <mcafee@battlezone.rs.itd.umich.edu> wrote:
++ >
++ >A large chunk of either routine's time is being spent constructing the huge
++ >array every time through. I've added two more variants that use a
++ >preexisting array, then put back what's removed when done:
++
++ Noooo, it doesn't. Them's regexes in there, and they result in 280
++ elements being removed. You're only putting one back. However, this
++ sure does highlight the advantage of splice over grep when you have
++ very few things to remove.
Not to mention that putting it back at the beginning makes it
very convenient for splice - it only needs to move 21 elements
next time.
Here's benchmark that creates the arrays before running the benchmark.
use strict;
use Benchmark;
my $TIMES = 100;
my $SIZE = 10000;
my @arrays1 = map {[0 .. $SIZE]} 1 .. $TIMES;
my @arrays2 = map {[0 .. $SIZE]} 1 .. $TIMES;
my $counter1 = 0;
my $counter2 = 0;
timethese ($TIMES, {
'splice' => sub {for (my $index = $#{$arrays1 [$counter1]};
$index >= $[;
$index --) {
splice @{$arrays1 [$counter1]}, $index, 1 if
$arrays1 [$counter1] -> [$index] =~ /2/
}
$counter1 ++;
},
'grep' => sub {my @array = grep {!/2/} @{$arrays2 [$counter2]};
$counter2 ++}
});
__END__
Benchmark: timing 100 iterations of grep, splice...
grep: 91 secs ( 86.87 usr 1.30 sys = 88.17 cpu)
splice: 182 secs (175.76 usr 0.83 sys = 176.59 cpu)
Abigail
--
perl -MNet::Dict -we '(Net::Dict -> new (server => "dict.org")\n-> define ("foldoc", "perl")) [0] -> print'
------------------------------
Date: Wed, 14 Oct 1998 16:05:13 GMT
From: "David L. Hawley" <dlhawley@user2.teleport.com>
Subject: Re: Perl object - why does this fail?
Message-Id: <ZY3V1.422$es1.231863@news.teleport.com>
Mark-Jason Dominus <mjd@op.net> wrote:
: Mark-Jason Dominus <mjd@op.net> wrote:
: >: 1. I guess you don't know what `strict' is for.
: David L. Hawley <dlhawley@user2.teleport.com> wrote:
: >I do understand what strict is for...
: Oh, sorry. If I can make a suggestion here, it's that you avoid
: generic questions like this one:
: >: >#What is going on here?
Good point - I spent a long time loking at the Camel, and perltaint and
knew that I was missing something simple - but fundamental.
: Those questions always make it sound like you know absolutely nothing,
: and substantially reduce the quality of the answers you get, because
: someone answering your question is likely to conclude from it that you
: know absolutely nothing.
: I'd like to make a more constructive suggestion here about how you
: could have phrased your question, but I can't because I still don't
: know what it was.
: >I tried making 3 files before posting - but didn't try the @dd:: prefix in
: >the file (or removing the strict).
: The other way to solve the `strict' problem is to write this:
: use vars '@ISA';
: That tells `strict' that `@ISA' is exceptional and that you mean to
: use it as a global variable.
This is clear now, thanks.
: >bb came from b which is short for base, likewise dd started as derived....
: Oh, sure. That makes more sense to me now. But I'd like to suggest
: that you take my suggestion anyway. I'd still like to suggest that
: it's easier to think about things that have descriptive names, and
: it's hard to think about things that have names that sound similar.
For a short throw away example, I don't see any point in making long
names, but then if one is going to post the example should be short and
clear. bb,dd misses on that point. Next time ...
--
David L. Hawley D.L. Hawley and Associates 1(503)274-2242
Software Engineer dlhawley@teleport.com
------------------------------
Date: 14 Oct 1998 09:43:01 -0700
From: larry@kiev.wall.org (Larry Wall)
Subject: Re: Perl object - why does this fail?
Message-Id: <702kal$ktu@kiev.wall.org>
In article <701c3g$637$1@monet.op.net>, Mark-Jason Dominus <mjd@op.net> wrote:
>The other way to solve the `strict' problem is to write this:
>
> use vars '@ISA';
>
>That tells `strict' that `@ISA' is exceptional and that you mean to
>use it as a global variable.
Another way is to set @ISA before declaring 'use strict'.
In 5.006 we're planning to support
our @ISA = qw(bb);
to do the same thing as 'use vars', only with a syntax like "my".
Larry
------------------------------
Date: Wed, 14 Oct 1998 16:11:53 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Perl on NT questions
Message-Id: <Pine.GSO.4.02A.9810140911110.1979-100000@user2.teleport.com>
On Wed, 14 Oct 1998 keydet89@yahoo.com wrote:
> 1. Does anyone know where I can find example scripts used by
> sysadmins?
There are some on CPAN.
> 2. Does anyone know where I can find the Win32::GUI or Tk modules?
Have you tried CPAN?
http://www.perl.org/CPAN/
http://www.perl.com/CPAN/
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 14 Oct 1998 16:03:01 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: perlQt: error in loading shared libraries
Message-Id: <Pine.GSO.4.02A.9810140902190.1979-100000@user2.teleport.com>
On Wed, 14 Oct 1998, fanhow wrote:
> Subject: perlQt: error in loading shared libraries
That sounds as if perl wasn't compiled or installed properly on your
system. Try again, and ensure that it passes all of the tests in 'make
test'. Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 14 Oct 1998 10:13:16 -0700
From: Andrew Perrin <aperrin@mcmahon.qal.berkeley.edu>
Subject: Re: Sending mail via CGI/Perl ?
Message-Id: <3624DBAC.AAC543C9@mcmahon.qal.berkeley.edu>
You can either pipe to sendmail and use a To: separately, or use a
variable within your open statement:
$address = %ENV{whatever};
open(MAIL, "| /usr/ucb/mail -t $address");
WeZzy wrote:
> passme
>
> Hiya,
>
> I'm trying to make a form-mail-processing script,
> that sends the information to an e-mail address
> selected from a drop-down-menu...
>
> Picture this:
>
> You fill in a form, and you have to select a country
> from a dropdownmenu, the value of this menu-option
> is an e-mail address, i.e. you choose Netherlands,
> the e-mail goes to netherlands@test.com, you choose
> USA, the e-mail goes to usa@test.com get the picture ?
>
> But to be able to do this, I have to know how I can read-out
> the selection made in the drop-down-box, I guess that's not
> the problem though, the real problem is HOW do I get this
> information in the e-mail ?
>
> Thought something like this:
>
> open(MAIL,"|mail sales\@ggo.nl");
>
> print MAIL <<"EOT";
>
> This is a simple email response from a form.
>
> Name: $in{"name"}
> Address: $in{"address"}
> City: $in{"city"}
> State: $in{"state"}
> Zip: $in{"zip"}
> Phone: $in{"phone"}
> Email: $in{"email"}
>
> EOT
>
> close(MAIL);
>
> But instead of sales@ggo.nl the script has to insert the e-mail
> address selected in the drop-down-box...
>
> I hope I was clear enough in explaining the problem, if not please
> e-mail me and I'll try to clearen it up.
>
> Thanks in advance !
>
> Wesly Grefrath
--
-------------------------------------------------------------
Andrew J. Perrin - NT/Unix/Access Consulting - (650)938-4740
aperrin@mcmahon.qal.berkeley.edu (Remove the Junk Mail King)
http://www.geocities.com/SiliconValley/Grid/7544/
-------------------------------------------------------------
------------------------------
Date: 14 Oct 1998 19:33:27 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: Sending mail via CGI/Perl ?
Message-Id: <83sogrf3q0.fsf@vcpc.univie.ac.at>
Re: Sending mail via CGI/Perl ?, Andrew
<aperrin@mcmahon.qal.berkeley.edu> said:
Andrew> You can either pipe to sendmail and use a To:
Andrew> separately, or use a variable within your open
Andrew> statement:
Andrew> $address = %ENV{whatever};
Why would the address be in the environment? (OK, the
QUERY_STRING *is* in the environment but y'all know what I
mean :-).
It would be in one of the parameters, preferably via
CGI::param(), "perldoc CGI" for details.
Andrew> open(MAIL, "| /usr/ucb/mail -t $address");
Not a good idea. Passing form entry data (or any external
data) through a shell and on the command-line is asking for
trouble.
I would recommend the Mail::Send module. Or the MIME::Tools
documentation if yuo want to construct MIME messages.
tony
------------------------------
Date: 14 Oct 1998 16:54:25 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: sorting hack
Message-Id: <702l01$3kn$2@client3.news.psi.net>
Larry Rosler (lr@hpl.hp.com) wrote on MDCCCLXIX September MCMXCIII in
<URL:news:MPG.108d72e2fd91bf1b98980a@nntp.hpl.hp.com>:
++
++ Essentially what you are saying is that, absent an infinitely parallel
++ computer, significant computation involves looping somewhere. Yes. But
++ this is not what you were addressing in your generalization about the
++ sort requested.
I was.
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
------------------------------
Date: Wed, 14 Oct 1998 18:37:15 +0000
From: Dave Mee <davemee@tvlistings.co.uk>
Subject: struggling with a regex... HEeeeelp!
Message-Id: <3624EF5B.CF387640@tvlistings.co.uk>
And they look *sooooo* easy in the books. :)
I'm parsing a textfile, and need to change the occurance of
<\#209>
into a minus symbol (-).
In fact, I need to change all manner of these stupid escaoe sequences.
However, my code never seems to work.
Here are some of my efforts:
$temp=$_;
$temp=~s/<\x23\\212>/\`/; # turn <\#212> into `
$temp=~s/<[\x23][\x5c]213>/[\x27]/g; # turn <\#213> into '
$temp=~s/<\x23\\209>/\-/; # turn <\#209> into -
Anyone know what I'm doing wrong? I want to do the translations on the
string $temp, and dump the output back into $temp. Am I way off the
mark, or too new to perl to get this?
And does anyone know how it *should* be done? :)
Many thanks for your eyetime...
Dave
------------------------------
Date: 14 Oct 1998 17:48:13 GMT
From: mike@mike.stok.co.uk (Mike Stok)
Subject: Re: struggling with a regex... HEeeeelp!
Message-Id: <702o4t$lkb@news-central.tiac.net>
In article <3624EF5B.CF387640@tvlistings.co.uk>,
Dave Mee <davemee@tvlistings.co.uk> wrote:
>And they look *sooooo* easy in the books. :)
>
>I'm parsing a textfile, and need to change the occurance of
>
><\#209>
>
>into a minus symbol (-).
>
>In fact, I need to change all manner of these stupid escaoe sequences.
>However, my code never seems to work.
>Here are some of my efforts:
In the debugger (started using perl -de 1):
DB<1> $str = 'This is a <\\#209> sign'
DB<2> print $str
This is a <\#209> sign
DB<3> $str =~ s/<\\#209>/-/g
DB<4> print $str
This is a - sign
If you have many codes to convert to characters you might say
DB<5> %translate = ('209' => '-')
DB<6> $str = 'This is a <\\#209> sign and <\\#210> is something else'
DB<7> $str =~ s/(<\\#(\d+)>)/defined $translate{$2} ? $translate{$2} : $1/ge
DB<8> print $str
This is a - sign and <\#210> is something else
(but with a beefier translation table)
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: Wed, 14 Oct 1998 12:08:03 -0400
From: rick@internetx.net (Rick Bauman)
Subject: system calls
Message-Id: <3624CC63.455FB0D@internetx.net>
I have the following in a perl program
system ("crypt", "we", "</tmp/ppw", ">/tmp/cpw") || die" Could not
encrypt password";
this works from a command line :crypt we </tmp/ppw >/tmp/cpw
any ideas?
r
--
Rick Bauman
http://www.lowcountry.net/
------------------------------
Date: 14 Oct 1998 17:40:44 GMT
From: alfredo@netaxs.com (Alfredo Dematteis)
Subject: Using $ENV{REMOTE_USER}
Message-Id: <702nms$cer@netaxs.com>
I'm having some problems extracting data from the ENV hash. The CGI script
lies on a realmed directory and I'm trying to grab the remote user logged
on via the $ENV{REMOTE_USER}. When the script is first executed, the
$ENV{REMOTE_USER} returns a valid userid; however, with subsequent calls
to the CGI, $ENV{REMOTE_USER} returns a blank userid. What might be
causing the environment hash to be 'blanked' ? Any thoughts ?
Alfredo de Matteis
alfredo@netaccess.com
------------------------------
Date: Wed, 14 Oct 1998 11:39:28 -0600
From: Alex Tatistcheff <alext@cri-boi.nospam.com>
Subject: Using Package Manager from the Win32 RK
Message-Id: <3624E1D0.D43A918@cri-boi.nospam.com>
I'm trying to install some perl modules using the Perl Package Manager
in the O'Reilly Perl Resource kit. The problem is that I connect to the
Internet via a proxy so the package manager can't find the ppd files.
Is there a place I can go and download the PPD files so I can install
them locally?
--
Alex Tatistcheff
CRI/The Resource Group, Inc.
Boise, ID
Please remove "nospam" from my email when replying
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3973
**************************************