[12989] in Perl-Users-Digest
Perl-Users Digest, Issue: 399 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 6 07:08:39 1999
Date: Fri, 6 Aug 1999 04:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 6 Aug 1999 Volume: 9 Number: 399
Today's topics:
clone() in Perl (Duplicating a data structure) <nico@echange.fr>
Re: Complex data structure (I.J. Garlick)
Re: Congressional Actions threatens programmer pay rate <mike@crusaders.no>
Re: Congressional Actions threatens programmer pay rate (Gary O'Keefe)
Re: DBI question <rhrh@hotmail.com>
Debugger ? sine2117@my-deja.com
Re: Debugger ? <alex@kawo2.rwth-aachen.de>
Help interpreting an error. <admin@futuristic.net>
Re: how can I write an e-mail in an perl prg? <salvador@my-deja.com>
Re: how can I write an e-mail in an perl prg? (Malcolm Ray)
Re: How do I replace a "space" character? <kims@emmerce.com.au>
Re: how to match this pattern? (Gary O'Keefe)
Re: Is there a module for SMB similar to Net::FTP? <kims@emmerce.com.au>
Is there any books on DBI? <jammin1@home.com>
Re: Is there any books on DBI? <alex@kawo2.rwth-aachen.de>
Re: Nastiness contrary to the spirit of perl? sine2117@my-deja.com
Re: Nastiness contrary to the spirit of perl? (Anno Siegel)
Re: Nastiness contrary to the spirit of perl? (Anno Siegel)
Re: Nastiness contrary to the spirit of perl? (Malcolm Ray)
Re: Nastiness contrary to the spirit of perl? (elephant)
Re: Nastiness contrary to the spirit of perl? (elephant)
Re: Perl programming standards <alex@kawo2.rwth-aachen.de>
Re: Problem reading forms with perl (elephant)
Re: qr{} and quoting pattern metachars (Ilya Zakharevich)
Re: qr{} and quoting pattern metachars <garethr@cre.canon.co.uk>
Re: Seeking for a page maintainer for the Cetus Links <nico@echange.fr>
Re: Skipping . and .. with readdir <guertin@middlebury.edu>
Re: Skipping . and .. with readdir (Anno Siegel)
unpack to a hash? jwilde74@my-deja.com
Re: unpack to a hash? <alex@kawo2.rwth-aachen.de>
RE: web bot needed <tmujak@wcom.co.uk>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 06 Aug 1999 11:56:08 +0200
From: Nicolas MONNET <nico@echange.fr>
Subject: clone() in Perl (Duplicating a data structure)
Message-Id: <37AAB138.3EF10631@echange.fr>
How can I simply clone a data structure in Perl?
In particular, I'm making heavy use of XML::Groves, and I don't want
to reparse the trees every time, it's a waste. But before I duplicate
it "by hand", I wanna know if there is a simple, more or less std
way to do it in Perl? I'm so surprised I can't think of one actually.
------------------------------
Date: Fri, 6 Aug 1999 10:27:20 GMT
From: ijg@connect.org.uk (I.J. Garlick)
Subject: Re: Complex data structure
Message-Id: <FG1H1K.EM6@csc.liv.ac.uk>
In article <37AA3351.E522E2E0@dstc.com>,
Derek Thomson <derek@dstc.com> writes:
>> >
>> > map {print "Code = $_\n"} @{$Codes{$Comp}};
>
> Map in a void context. Why build a list that you're going to throw away?
I did say some one would take me to task for this one my original post. :-)
Of course I was throwing away the list, but surely you should be able to
do this it seams so clean.
If you can ever call 4 or 5 lines of code compressed into 1 line clean.
--
Ian J. Garlick
ijg@csc.liv.ac.uk
People will accept your ideas much more readily if you tell them that
Benjamin Franklin said it first.
------------------------------
Date: Fri, 6 Aug 1999 10:54:56 +0200
From: "Trond Michelsen" <mike@crusaders.no>
Subject: Re: Congressional Actions threatens programmer pay rates encore
Message-Id: <vpxq3.122$Et3.1078@news1.online.no>
[Posted and CC'd]
Walker Rowe <limit_h1b_visas@yahoo.com> wrote in message
news:7odof9$1jt$1@autumn.news.rcn.net...
> So to you European and Indian programmers I say stay over their and
brighten
> up your own economy by embracing the ideas of Margaret Thatcher and Ronald
> Reagan style capitalism. They did it in Hong Kong. They did it in
> Singapore. If you create some jobs over there you wont need to work here.
> Then we will welcome you as tourists and you can even come to my house.
We'
> ll share some mango pickles and green chilis.
OK, I don't feel like discussing politics or American supremacy, at least
not in this group, but I just have to point out that I disagree
wholeheartedly with just about everything you wrote here.
--
Trond Michelsen
------------------------------
Date: Fri, 06 Aug 1999 10:46:07 GMT
From: gary@onegoodidea.com (Gary O'Keefe)
Subject: Re: Congressional Actions threatens programmer pay rates encore
Message-Id: <37aaafe7.178925695@news.hydro.co.uk>
Walker Rowe wrote:
[ a whole load of knee-jerk sillyness snipped ]
>To my European friends I would say why don't you improve your own economy
>and quit doffing off ours? :"On the dole", isn't that what you Brits say?
What we say these days (thanks to the eternally pleasant Norman
Tebbit) is "get on your bike." He'd be a pal of yours, being an
ignorant and stupid man prone to mistaking racism and protectionism
for libertarian idealism.
>To the French and Germans I say why protect your farmers with subsidized
>crops.
This is a question. You end questions with a question mark: '?'.
That's an easy question to answer as well - it's easier to pay them
hush money than have them parking their tractors in Parisian streets
every day.
>Your European and French parliaments are dominated by Socialists.
>Your 17% VAT tax stymies free enterprise and hinders entrepreneurs. Quit
>taxing your citizens so heavily. Give your employers the right to fire
>workers and allow your businesses to award stock options.
They do. Duh! As for the tax, it pays for the NHS, which is handy.
What gets me is that you actually believe this sort of post may
actually get read and cause a difference in the beliefs of the
readers, rather than just getting their backs up.
>Then you won't
>have to suffer 20% unemployment in Spain. What happened to the
>freedom-loving ideas of the French revolution? In 1789 the words "liberté,
>egalité, fraternité" meant freedom from the clutches of bureaucracy. Bring
>back Voltaire and Robespierre and toss out Jacque Delors.
Bring back dead, brutal murderers? Hmmm. This is the most reactionary
nonsense that I have heard on usenet for a while. Listen carefully:
1. These people are dead
2. They've been dead for nearly 200 years
3. That was a long time ago
4. We have no time machines
5. We can't go back into the past
Do you get it? The past is gone. There's no going back. So why don't
you try living in the 20th century while it's here.
>But as we all know Europeans are only the most vocal lot of high tech
>immigrants. By far the biggest abusers of our generous immigration laws
>wish to attract little attention and tend to remain mum. These are the
>Indians. Fully 42% of H1B visa go to overseas Indians. Why don't you
>Indians practice a little capitalism in Delhi and Bombay and rid your
>economy of socialist law? I don't dislike you personally-I have many Indian
>friends and enjoy reading V.S. Naipal and Salman Rushdie. And "Karma Sutra"
>was a hell of a movie. But when you flock here by the millions I must
>protest.
[ pointless and deeply flawed racist diatribe snipped ]
Now we get to the point. At last. Here are your arguments:
1. Indians are different from me
2. They have different customs and practises
3. They burn their wives to death if not paid enough (?!)
4. They are commies
5. I like indians when they are 'Uncle Toms'
6. I don't like indians when they're better than me at something
7. They are in the US now! Run for the hills! Don't forget your gun!
You forgot:
8. They are in league with
The Homosexuals
The Jews
The Elders of Zion
The Military-Industrial Complex
The Illuminati
The Greys
9. White is right! Unite and fight!
Jesus. I am the most conservative person I know, but you are a nut! I
believe in freedom of speech, freedom of association, freedom of
movement, property rights, and competition but all you seem to believe
in is the most negative, exclusionary, narrow-minded,
I'm-alright-Jack, not-in-my-back-yard shite.
Go away you nasty little man.
Gary (a scottish contractor - and if you have a problem with that then
I'm gonna get Braveheart on yo' ass!)
--
Gary O'Keefe
gary@onegoodidea.com
You know the score - my current employer has nothing to do with what I post
------------------------------
Date: Fri, 06 Aug 1999 08:49:22 +0100
From: Richard H <rhrh@hotmail.com>
Subject: Re: DBI question
Message-Id: <37AA9382.BA5165F8@hotmail.com>
hoz wrote:
>
> I am trying to confirm the return value ($rv) from a SELECT
> statement. The DBI doc is not specific about what is returned from a
> SELECT statement if zero rows are returned. My tests show that "0E0"
> is returned in the case where zero rows are returned. Can I count on
> this? The DBI doc simply says it will return true.
> Can anyone confirm this? (my pseudo code...)
> if select returns a value, $rv >0
> if select returns nothing $rv eq "0E0"
> if select doesn't return $rv is undef
> -hoz
The DBI doc (vers 1.11) also says that use of the rows method with
select statements is not recommended as the results with drivers will
differ.
Are you wanting to count or just catch undefs and not founds??
maybe better to count the rows yourself and rely on fetch,
or try the dbi-users:
www.isc.org
Richard H
------------------------------
Date: Fri, 06 Aug 1999 09:23:54 GMT
From: sine2117@my-deja.com
Subject: Debugger ?
Message-Id: <7oe9j4$rsi$1@nnrp1.deja.com>
I was just woundering, idon't use it myself but is there any debugger
available for perl ? If so, how does it works ?
/Sine
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 06 Aug 1999 11:31:25 +0200
From: Alex Farber <alex@kawo2.rwth-aachen.de>
To: sine2117@my-deja.com
Subject: Re: Debugger ?
Message-Id: <37AAAB6D.D735322D@kawo2.rwth-aachen.de>
Hi Sine,
sine2117@my-deja.com wrote:
> I was just woundering, idon't use it myself but is there any debugger
> available for perl ? If so, how does it works ?
the built-in (just use -d switch) Perl debugger is amazing.
There is an introductionary article on it at "The Linux Journal":
http://linuxjournal.com:82/cgi-bin/frames.pl/lj-issues/issue49/2484.html
There's also a more visual Tk-frontend to it (-d:ptkdb), but you must
install it first from http://www.cpan.org
Regards
Alex
--
Ich studiere Elektrotechnik (Technische Informatik) an der RWTH Aachen
und bin ein guter Perl-Programmierer (arbeite seit 4 Jahren als Intranet-
Entwickler). Kann auch C, Java, SQL, JavaScript und HTML, CGI und TCP/IP.
Ich suche eine gut bezahlte Diplomstelle in Koeln, Aachen oder Umgebung.
------------------------------
Date: Fri, 6 Aug 1999 06:48:04 -0400
From: "James A Culp III" <admin@futuristic.net>
Subject: Help interpreting an error.
Message-Id: <7oeeu6$pvk$1@ffx2nh3.news.uu.net>
This is a code snippet I tested after reading perldoc Mail::Mailer.
It returns errors that I do not understand can someone please help me make
sense of this. I think I might be misunderstanding the documentation but
am not sure.
(critiques and "flames" gladly accepted)
The "script"
#########
home:/test/cgi-bin# perl -w
use strict;
use Mail::Mailer;
my ($mailer, $mailcmd, @mailargs, %headers, $body);
$mailcmd = "/usr/bin/sendmail";
@mailargs = ('-t');
$mailer = new Mail::Mailer $mailcmd, @mailargs;
$headers{to} = 'user@host.com';
$headers{from} = 'user2@host2.com';
$headers{subject} = 'Testing Mail::Mailer';
$headers{cc} = 'user3@host3.com';
$mailer->open(\%headers);
$body = 'Testing Mail::Mailer for From: capability\n I really hope this
works because it will be easier than using temp files or pipes\n\nJames';
print $mailer $body;
$mailer->close;
##########
The errors
##########
Warning: Use of "require" without parens is ambiguous at (eval 1) line 1.
Bareword found where operator expected at (eval 1) line 1, near "/usr/bin"
(Missing operator before bin?)
Bareword "bin" not allowed while "strict subs" in use at (eval 1) line 1.
Unquoted string "bin" may clash with future reserved word at (eval 1) line
1.
Bareword "sendmail" not allowed while "strict subs" in use at (eval 1) line
2.
Unquoted string "sendmail" may clash with future reserved word at (eval 1)
line 2.
syntax error at (eval 1) line 1, near "require Mail::Mailer::/usr/"
I expected this to send an e-mail to user@host1.com with the from: field as
user2@host2.com and a CC: going to user3@host3.com instead of the errors.
Thank you for any and all help,
--
James A Culp III
admin@futuristic.net
http://www.futuristic.net/ for inexpensive web, domain, and e-mail hosting
------------------------------
Date: Fri, 06 Aug 1999 10:33:17 GMT
From: Salva <salvador@my-deja.com>
Subject: Re: how can I write an e-mail in an perl prg?
Message-Id: <7oedld$uf0$1@nnrp1.deja.com>
In article <slrn7qjgds.7sm.M.Ray@carlova.ulcc.ac.uk>,
M.Ray@ulcc.ac.uk (Malcolm Ray) wrote:
> >open M,"|mail xyz@gmx.com";
> >print M $text;
> >close M;
>
> I count four errors in that. Not bad for three lines of code!
Ok, I can see that the @ should be escaped... which are the other
three???
- Salva.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 6 Aug 1999 10:53:33 GMT
From: M.Ray@ulcc.ac.uk (Malcolm Ray)
Subject: Re: how can I write an e-mail in an perl prg?
Message-Id: <slrn7qlfld.bh7.M.Ray@carlova.ulcc.ac.uk>
On Fri, 06 Aug 1999 10:33:17 GMT, Salva <salvador@my-deja.com> wrote:
>In article <slrn7qjgds.7sm.M.Ray@carlova.ulcc.ac.uk>,
> M.Ray@ulcc.ac.uk (Malcolm Ray) wrote:
>
>> >open M,"|mail xyz@gmx.com";
>> >print M $text;
>> >close M;
>>
>> I count four errors in that. Not bad for three lines of code!
>
>Ok, I can see that the @ should be escaped... which are the other
>three???
1. You didn't check the success of the open. Always, always check
whether your opens succeed.
2. You didn't check the success of the close. If you don't know why
this is important when talking to pipes, you haven't read perlipc.
3. You're relying on a program called 'mail' being on your PATH, and
being the right one to use. Better to make this a variable for
easier customisation.
Ok, you can argue about 3, but not 1 or 2.
--
Malcolm Ray University of London Computer Centre
------------------------------
Date: Fri, 6 Aug 1999 18:55:08 +1000
From: "Kim Saunders" <kims@emmerce.com.au>
Subject: Re: How do I replace a "space" character?
Message-Id: <933929679.779070@draal.apex.net.au>
>It's trivial. A quick look in the manual will tell you how.
>It's also a question that's asked here over and over again.
Is that meant to be a hint? "It's TRivial"??? :)
KimS
------------------------------
Date: Fri, 06 Aug 1999 09:16:57 GMT
From: gary@onegoodidea.com (Gary O'Keefe)
Subject: Re: how to match this pattern?
Message-Id: <37aaa4d6.176092627@news.hydro.co.uk>
elephant wrote:
>Gary O'Keefe writes ..
>>By the way, before posting to the group, be sure to scrutinise (and I
>>mean really scrutinise) the documentation with your perl installation
>>(either perldoc or man) before you post a question.
>
>but then he stumbles on to say...
>
>>Have you tried
>>
>> @words = split /[\_|\.]/, $filename;
>
>you advice goes doubly so for posting answers - so perhaps you might want
>to take your own advice and lookup perlre in regards to the Character
>Class metacharacters and work out what'll happen above if
>
> $filename = 'some|word_some|other|word_1.gif';
>
>and why you didn't just write
>
> @words = split /[_.]/, $filename;
You're in good company Jason: Larry R kicked my ass for the same thing
(escaping characters unnecessarily) in anther post. From that I can
take it that I'd better take your advice and revisit perlre.
Gary
--
Gary O'Keefe
gary@onegoodidea.com
You know the score - my current employer has nothing to do with what I post
------------------------------
Date: Fri, 6 Aug 1999 18:16:09 +1000
From: "Kim Saunders" <kims@emmerce.com.au>
Subject: Re: Is there a module for SMB similar to Net::FTP?
Message-Id: <933927341.606584@draal.apex.net.au>
>I'm interested in getting to NT shares from a Linux box using perl
>scripts to automate some daily housekeeping tasks. Is there a module out
>there to help me with this?
>
>I have Samba installed on the Linux box. I suppose I could parse the
>output from smbclient, but that seems like kludge.
You should just be able to use smbmount and mount it on your normal FS, and
then read & write as you normally would???
KimS
------------------------------
Date: Fri, 06 Aug 1999 09:01:54 GMT
From: "John C." <jammin1@home.com>
Subject: Is there any books on DBI?
Message-Id: <37AAA481.8F72BA9E@home.com>
Hi, I am new to perl and am wondering if there are any books on DBI or
information available on the web.
I have been looking now for about four straight hours and haven't found
anything useful yet.
I would very much appreciate it if someone could show me the right
direction on finding out how the DBI interface works.
Thanks.
John
PS
I would like to use the mSQL DBD.
------------------------------
Date: Fri, 06 Aug 1999 11:15:08 +0200
From: Alex Farber <alex@kawo2.rwth-aachen.de>
To: jammin1@home.com
Subject: Re: Is there any books on DBI?
Message-Id: <37AAA79C.C6E48946@kawo2.rwth-aachen.de>
Hi John,
"John C." wrote:
> Hi, I am new to perl and am wondering if there are any books on DBI or
> information available on the web.
> I would like to use the mSQL DBD.
a book "MySQL & mSQL" http://www.oreilly.com/catalog/msql/
has just been published by O'Reilly
Regards
Alex
--
Ich studiere Elektrotechnik (Technische Informatik) an der RWTH Aachen
und bin ein guter Perl-Programmierer (arbeite seit 4 Jahren als Intranet-
Entwickler). Kann auch C, Java, SQL, JavaScript und HTML, CGI und TCP/IP.
Ich suche eine gut bezahlte Diplomstelle in Koeln, Aachen oder Umgebung.
------------------------------
Date: Fri, 06 Aug 1999 08:32:41 GMT
From: sine2117@my-deja.com
Subject: Re: Nastiness contrary to the spirit of perl?
Message-Id: <7oe6j9$q1f$1@nnrp1.deja.com>
In article <so5ymocm.fsf@hume.jhuccp.org>,
James Meacham <jmeacham@hume.jhuccp.org> wrote:
>
> When I first left the world of the church and academe, where I had
spent my last 15 or so years, to follow my interest in computers, the
attitude of humanity embodied in the Camel Book attracted me. Larry
Wall is clearly a spiritual and humanistic person, and the fact that
the language embodies the desire to meet people how they think rather
than forcing them into reductionistic computerisms was, and remains,
among the main reasons I use perl rather than the other languages out
there. So while the creator of the language and really the language
itself manifest an attitude of humanistic synthesis, the overwhelming
tone of this newsgroup is one of nastiness, condescension, and
intolerance.
>
> Perhaps this is due only to a couple of prodigious posters with bad
attitudes, and also to the disembodiment inherent in the Usenet medium,
but I'd be interested to know what others thought about this apparent
contradiction, or at least inconsistency. I've been programming and
working with computers for a long time now, and I could probably be a
useful member of the perl community, but the tone of this newsgroup has
discouraged me from posting lest I make a mistake, or be guilt of not
having read the FAQ recently or carefully enough. Just curious if I'm
the only one, and if I'm the only one who has noticed this disparity
between the creator and the language in contradistinction to the Usenet
groups devoted to the language.
>
> Peace,
>
> James
>
You are all talking about that Camel Book... I understand that it is
som kind of bible for the perl language, can you tell me more about it?
Is it for newbies or is it a really deep book ?
I have this book called "CGI-programming with perl" it's a swedish book
wroted by a guy called 'Frykholm' or something, it's a good book for
bouth beginners and advanced programmers. But it doesnt bring up the $_
variable, so i really dont know what it does. I think it is relevant to
the $1,$2,$3... variables but i'm not sure.. well i better spend some
time looking in the perl doc.
Best regards
Sine
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 6 Aug 1999 09:39:22 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Nastiness contrary to the spirit of perl?
Message-Id: <7oeaga$fob$1@lublin.zrz.tu-berlin.de>
llornkcor <llornkcor@llornkcor.com> wrote in comp.lang.perl.misc:
As usual you give no attribution, but presume to teach others good
usenet manners. The reply was to TomC.
>>And if the whiners really want cruel and sadistic posts, there are
>>plenty of infinitely more nasty newsgroups you can involve yourself in,
>>full of hate and pain.
>
>why is it always, 'well THEY'RE doing it, so we should too'?
You get the mechanics wrong. We're not doing "it" because others
do it, but because we have the same reasons as others for doing it.
Clpm has a medium level of nastiness as newsgroups go. It's how
usenet works. Get it? I thought not.
>what is so hard about showing compassion?
What an utterly silly question. Compassion is one of the hardest
human traits to achieve. What you want is cheap laissez-faire.
Yes, that's easy. It's also utterly useless.
> Unless you are so wrapped up
>in your elitism, that you have forgotten how it feels.
Oh, compassion is something that makes you feel good. I knew I had
got something wrong there.
What we have here, and in all working newsgroups, has been called
meritocracy. It's not elitism, it's not cliquishness and it's not
egotism. Show us what you have done for the perl community. Then
preach us how to run a newsgroup (and be laughed out of the door
anyway).
Anno
------------------------------
Date: 6 Aug 1999 09:43:53 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Nastiness contrary to the spirit of perl?
Message-Id: <7oeaop$fpn$1@lublin.zrz.tu-berlin.de>
llornkcor <llornkcor@llornkcor.com> wrote in comp.lang.perl.misc:
>
>ditto...
>
>ditto....
>
>ditto....
You seem to think "ditto" means "I agree". Look it up.
Anno
------------------------------
Date: 6 Aug 1999 10:14:30 GMT
From: M.Ray@ulcc.ac.uk (Malcolm Ray)
Subject: Re: Nastiness contrary to the spirit of perl?
Message-Id: <slrn7qldc6.b8t.M.Ray@carlova.ulcc.ac.uk>
On 05 Aug 1999 23:59:51 -0600, llornkcor <llornkcor@llornkcor.com> wrote:
>>You're kidding, right? Sure, a couple of people have slightly
>>over-itchy flame fingers, but it's really pretty tame compared to much
>
>yes, but its the same people doing it over, and over, and over, and
>over
That should give you a clue.
Anyone can contribute to the group. Since the bad-tempered replies
are for questions which are easily answered, a large number of clpm
readers could correctly answer those questions. If the curmudgeons
were outnumbered 10-1 by unfailingly polite helpers, they'd become
irrelevant. I don't think I'd like a group where rude FAQ-askers (it's
always rude to ask a FAQ) merely got rewarded instead of rewarded *and*
chastised, as at present, but if that's what the readership wants,
that's what they should work to get. Simply complaining doesn't cut
it: it's been tried ad nauseam, and it makes no difference.
On the other hand, whining is a lot easier than answering questions
day after day.
--
Malcolm Ray University of London Computer Centre
------------------------------
Date: Fri, 6 Aug 1999 20:16:46 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: Nastiness contrary to the spirit of perl?
Message-Id: <MPG.12156118952a83f2989bf9@news-server>
Tom Christiansen writes ..
> ...The whiners whom you're
>answering should try to take on comp.lang.c for a while.
-
> "How do I use the open() commmand?" [sic]
>
> "How do read a form into a variable?"
>
>I dare anyone to post those there and see what you get.
I wanna see someone post:
"I need a CGI program to detect which browser someone's using ?"
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Fri, 6 Aug 1999 20:22:17 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: Nastiness contrary to the spirit of perl?
Message-Id: <MPG.121562648200d9e989bfa@news-server>
llornkcor writes ..
>why is it always, 'well THEY'RE doing it, so we should too'?
it's not .. it's a case of "EVERYONE gets pissed off with stupid
questions"
>what is so hard about showing compassion?
what's more compassionate .. carrying a baby everywhere it wants to go ?
- or teaching it how to walk ?
> Unless you are so wrapped up
>in your elitism, that you have forgotten how it feels.
oh gee .. now you've got and hurt my feelings .. show a little compassion
next time !!
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Fri, 06 Aug 1999 10:38:25 +0200
From: Alex Farber <alex@kawo2.rwth-aachen.de>
To: Murali V <diffs@vsnl.com>
Subject: Re: Perl programming standards
Message-Id: <37AA9F01.A7624287@kawo2.rwth-aachen.de>
Hi Murali,
Murali V wrote:
> I'm looking for some document which will give me perl programming standards.
> Can anyboody give me any pointers.
you probably mean recommendations? See "perldoc perlstyle"
(just enter it in your shell after Perl installation)
Regards
Alex
--
Ich studiere Elektrotechnik (Technische Informatik) an der RWTH Aachen
und bin ein guter Perl-Programmierer (arbeite seit 4 Jahren als Intranet-
Entwickler). Kann auch C, Java, SQL, JavaScript und HTML, CGI und TCP/IP.
Ich suche eine gut bezahlte Diplomstelle in Koeln, Aachen oder Umgebung.
------------------------------
Date: Fri, 6 Aug 1999 19:23:45 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: Problem reading forms with perl
Message-Id: <MPG.12150a738de215ac989bf7@news-server>
Steve Yates writes ..
>genelong@my-deja.com wrote:
>>perldoc -q "How do I decode a CGI form"
>
> This perldoc command searches for the question in the perl doc files.
>He is assuming you have access to a shell account on UNIX, which many
>people don't. You'll see a lot of one line posts in this group to the
>effect of "man xxxx" (display the manual for xxx). Fortuantely CPAN has
>the perl documentation also.
Steve .. check your facts before you post .. perldoc works on all
incardnations of Windows .. this is why I always use this in my examples
unless the user has identified themselves as a non-Windows user
you'll also see that I always use the command in the form
perldoc -q "text here"
rather than
perldoc -q 'text here'
because only the former works on windows
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: 6 Aug 1999 08:10:41 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: qr{} and quoting pattern metachars
Message-Id: <7oe5a1$q5p$1@charm.magnus.acs.ohio-state.edu>
[A complimentary Cc of this posting was sent to Abigail
<abigail@delanet.com>],
who wrote in article <slrn7qku4t.uij.abigail@alexandra.delanet.com>:
> Tom Christiansen (tchrist@mox.perl.com) wrote on MMCLXVI September
> MCMXCIII in <URL:news:37aa567d@cs.colorado.edu>:
> !!
> !! here's something Ilya put into recent incarnations of perlop:
> !!
> !! Gory details of parsing quoted constructs
> !!
> !! Some passes discussed below are performed concurrently, but
> !! because their results are the same, we consider them
> !! individually. For different quoting constructs, Perl performs
> !! different numbers of passes, from one to five, but these passes
> !! are always performed in the same order.
> !!
> !! Finding the end
> !!
> !! Removal of backslashes before delimiters
> !!
> !! Interpolation
> !!
> !! This step is the last one for all constructs except regular
> !! expressions, which are processed further.
> !!
> !! Interpolation of regular expressions
> !!
> !! Optimization of regular expressions
>
>
> This leaves me wondering where the interpolation of "\x20" constructs
> happens. As far as I can tell this isn't discussed in this lengthy
> section. A first guess would be the "Interpolation" part,
Correct: for string case. Wrong: for regexen.
> but that
> can't be, unless the paragraph "Some passes ... same order" is wrong.
No it is not. It is just that the same pass can do different things
in different situation. Note that some *other* part is not correct:
only some backslash-combinations are passed to REx engine, others are
handled at the level of "Interpolation":
/* leaveit is the set of acceptably-backslashed characters */
char *leaveit =
PL_lex_inpat
? "\\.^$@AGZdDwWsSbBpPXO+*?|()-nrtfeaxcz0123456789[{]} \t\n\r\f\v#"
: "";
As you could see, \x is passed to REx engine, but \< is processed
right there, during "Interpolation" step.
Ilya
------------------------------
Date: Fri, 6 Aug 1999 10:09:14 GMT
From: Gareth Rees <garethr@cre.canon.co.uk>
Subject: Re: qr{} and quoting pattern metachars
Message-Id: <si672t1ar9.fsf@cre.canon.co.uk>
Tom Christiansen <tchrist@mox.perl.com> wrote:
> Gory details of parsing quoted constructs
Some aspects of this are bizarre. For example
perl -we 'print do { local $\="foo"; "$\\" }'
prints "foo\" - neither of the backslashes escapes the character that
follows.
--
Gareth Rees
------------------------------
Date: Fri, 06 Aug 1999 12:00:36 +0200
From: Nicolas MONNET <nico@echange.fr>
Subject: Re: Seeking for a page maintainer for the Cetus Links
Message-Id: <37AAB244.E15EDE7A@echange.fr>
Marcel Grunauer wrote:
>
> On Sun, 18 Jul 1999 14:23:01 +0200, "Manfred Schneider"
> <manfred.schneider@rhein-neckar.de> wrote:
>
> >To enhance and to improve the site we are currently looking for someone
> >who would like to take over the page
> >
> > Perl http://www.cetus-links.org/oo_perl.html
>
> You might be better off at misc.jobs.offered, or
> perl-jobs-announce@happyfunball.pm.org (the perl-jobs-announce list on
> www.pm.org).
HM, I don't think it is a PAID job.
------------------------------
Date: 05 Aug 1999 08:55:11 -0400
From: David Guertin <guertin@middlebury.edu>
To: Uri Guttman <uri@sysarch.com>
Subject: Re: Skipping . and .. with readdir
Message-Id: <x6i7lna1j68.fsf@caddis.middlebury.edu>
>>>>> "UG" == Uri Guttman <uri@sysarch.com> writes:
DG> while ($_ = grep !/^\.\.?$/, readdir (INPUT_DIR)) {
DG> dostuff;
DG> }
UG> that is getting all the dirs and assigning then number of dirs other
UG> than . and .. to $_.
So that's where that curious "12" was coming from!
UG> you need to do the filter in the loop and not in
UG> the while condition. do this:
UG> next if /^\.\.?$/ ;
Cool! Thanks!
FWIW, another suggestion I got was:
@foo = grep !/^\.\.?$/, readdir INPUT_DIR;
foreach (@foo) {
dostuff;}
I kinda like that one, too; it gets all the directory reading done in
one swell foop.
Cheers,
--
Dave Guertin
guertin@middlebury.edu
------------------------------
Date: 6 Aug 1999 08:23:00 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Skipping . and .. with readdir
Message-Id: <7oe614$fj9$1@lublin.zrz.tu-berlin.de>
David Guertin <guertin@middlebury.edu> wrote in comp.lang.perl.misc:
[...]
>FWIW, another suggestion I got was:
>
> @foo = grep !/^\.\.?$/, readdir INPUT_DIR;
> foreach (@foo) {
> dostuff;}
>
>I kinda like that one, too; it gets all the directory reading done in
>one swell foop.
And what exactly is the advantage in that?
Anno
------------------------------
Date: Fri, 06 Aug 1999 08:37:15 GMT
From: jwilde74@my-deja.com
Subject: unpack to a hash?
Message-Id: <7oe6rr$qao$1@nnrp1.deja.com>
To populate %H, I currently use substr to pull
$buffer apart.
%H = (
trc => substr($buffer, 0, 2),
st1 => substr($buffer, 6, 2),
st2 => substr($buffer, 8, 2),
st3 => substr($buffer, 10, 2),
st4 => substr($buffer, 12, 2),
st5 => substr($buffer, 14, 2),
);
I imagine that using unpack() rather than substr()
would be a more efficient way to do this.
However, nothing I've tried seems to work. Here's
my latest attempt.
($H{trc}, $H{st1}, $H{st2}, $H{st3}, $H{st4},
$H{st5}) =>
unpack("a2 x4 a2 a2 a2 a2 a2" , $buffer);
Any help would be appreciated!
Best Regards,
Justin
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 06 Aug 1999 11:21:01 +0200
From: Alex Farber <alex@kawo2.rwth-aachen.de>
To: jwilde74@my-deja.com
Subject: Re: unpack to a hash?
Message-Id: <37AAA8FD.623AB511@kawo2.rwth-aachen.de>
Hi Justin,
jwilde74@my-deja.com wrote:
> To populate %H, I currently use substr to pull
> $buffer apart.
>
> %H = (
> trc => substr($buffer, 0, 2),
> st1 => substr($buffer, 6, 2),
> st2 => substr($buffer, 8, 2),
> st3 => substr($buffer, 10, 2),
> st4 => substr($buffer, 12, 2),
> st5 => substr($buffer, 14, 2),
> );
>
> I imagine that using unpack() rather than substr()
> would be a more efficient way to do this.
> However, nothing I've tried seems to work. Here's
> my latest attempt.
>
> ($H{trc}, $H{st1}, $H{st2}, $H{st3}, $H{st4},
> $H{st5}) =>
> unpack("a2 x4 a2 a2 a2 a2 a2" , $buffer);
from "perldoc perlop":
The => digraph is mostly just a synonym for the comma operator.
So you are actually trying
($H{trc}, $H{st1}, $H{st2}, $H{st3}, $H{st4}, $H{st5}),
unpack("a2 x4 a2 a2 a2 a2 a2" , $buffer);
Regards
Alex
--
Ich studiere Elektrotechnik (Technische Informatik) an der RWTH Aachen
und bin ein guter Perl-Programmierer (arbeite seit 4 Jahren als Intranet-
Entwickler). Kann auch C, Java, SQL, JavaScript und HTML, CGI und TCP/IP.
Ich suche eine gut bezahlte Diplomstelle in Koeln, Aachen oder Umgebung.
------------------------------
Date: Fri, 6 Aug 1999 10:25:11 +0100
From: "Mujakporue, Trey" <tmujak@wcom.co.uk>
To: "'comp.lang.perl.misc@list.deja.com'" <comp.lang.perl.misc@list.deja.com>
Subject: RE: web bot needed
Message-Id: <11020643E71FD311ACAA0008C7C563F3AF2259@gblon1c3ex1.wcom.co.uk>
Why not write one and claim the reward!
-----Original Message-----
From: Toyin Akinmusuru [mailto:takinmus@umich.edu]
Sent: 05 August 1999 23:07
To: comp.lang.perl.misc@list.deja.com
Subject: web bot needed
Message from the Deja.com forum:
comp.lang.perl.misc
Your subscription is set to individual email delivery
Hi folks,
I'm in need of a spider bot to pull info from a group of text files on
different sites and put it into a format my db can handle. We're
willing to pay at least US$1000 for this.
-Toyin
_____________________________________________________________
Deja.com: Share what you know. Learn what you don't.
http://www.deja.com/
* To modify or remove your subscription, go to
http://www.deja.com/edit_sub.xp?group=comp.lang.perl.misc
* Read this thread at
http://www.deja.com/thread/%3C37AA0AFD.7BC47B8B%40umich.edu%3E
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 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.
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 V9 Issue 399
*************************************