[9242] in Perl-Users-Digest
Perl-Users Digest, Issue: 2837 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 11 08:07:33 1998
Date: Thu, 11 Jun 98 05:00:53 -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 Thu, 11 Jun 1998 Volume: 8 Number: 2837
Today's topics:
Re: [META] hypersensitivity jimbo@soundimages.co.uk
Re: Am I looking at an anonymous array (Erland Sommarskog)
Re: Am I looking at an anonymous array (Erland Sommarskog)
Re: Am I looking at an anonymous array <tchrist@mox.perl.com>
ascii to hex (Jason Oakley)
Re: Capitalizing acronyms (Re: Is PERL case sensitive?) jimbo@soundimages.co.uk
Re: Capitalizing acronyms (Re: Is PERL case sensitive?) jimbo@soundimages.co.uk
Care to check a script of mine? <alex@aloud.com>
Re: CFV: comp.lang.perl.moderated moderated <sb@sdm.de>
Re: CFV: comp.lang.perl.moderated moderated (Greg Andrews)
Re: CFV: comp.lang.perl.moderated moderated (Chris Nandor)
Re: Complete newbie question: Please help if possible! <quednauf@nortel.co.uk>
linker counter <support@derby-county.com>
Re: linker counter <tchrist@mox.perl.com>
Re: Number of digits in a string <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: Number of digits in a string <tchrist@mox.perl.com>
Opening Files <teds@linex.com>
Re: Opening Files <quednauf@nortel.co.uk>
Re: Prob in FAQ: Week of the year greene@gucc.org
Re: Prob in FAQ: Week of the year (Lasse =?ISO-8859-1?Q?Hiller=F8e?= Petersen)
problem compiling perl5.004_004 <bill@TechServSys.com>
shadow password <laurent.lavaud@u-bordeaux2.fr>
Re: Stages in a pipeline <bowlin@sirius.com>
taking data out of ':' delimited string and placing it <azman@bnex.com>
Re: Where is the robot? <quednauf@nortel.co.uk>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 11 Jun 1998 11:12:30 +0100
From: jimbo@soundimages.co.uk
Subject: Re: [META] hypersensitivity
Message-Id: <uk96o5jsh.fsf@JIMBOSNTSERVER.i-have-a-misconfigured-system-so-shoot-me>
Scratchie <upsetter@ziplink.net> writes:
>
> Greg Bacon <gbacon@cs.uah.edu> wrote:
> : : You know, there was a time when I used to auto-select your posts.
> : :
> : : *plonk*
>
> : It's really disheartening to see such a high population of
> : hypersensitive crybabies in this newsgroup. I'll be glad when the first
> : of July has come and gone.
>
> Yeah, after all, anybody who dares to (a) attempt to use Perl on Win95 and
> (b) post a question regarding it to this newsgroup *deserves* to get 10
> tons of shit dumped on their head, right?
<Said with some of tongue in cheek from time to time>
Yeah, it's really disheartening to see such a high population of
losers in the OS wars being such hypersensitive crybabies in this
newsgroup. *nix had the chance to be the OS of the desktop but chased
the holy grail of the corporate license revenue gravy train. So, *nix
fans, face up to the facts, your approach and methodology is not
widespread, not well known and not well understood by the largest
population of users on the planet. As was stated earlier in a related
post, don't read and/or don't respond if you don't like the platform
and/or the methodology and/or approach that such a platform embodies.
Even more disheartening is that Mr. Bacon is a moderator should a
moderated group become reality. I fear that Perl, if left to the likes
of Mr. Bacon, will become (even more than today) a culture of us vs
them. The **in the know and are'nt we just the greatest wizards of all
time** vs **the rest of us who have heard and want to learn and use
Perl but are considered sub human because we hold an OS license from
Redmond**.
Arguing the relative merits of OS's and approaches and methodologies
can be an instructive and enlightening endeavor. But to place a ton of
bricks on top of someone who asked a reasonable question simply
because they use an OS that does not include tools found on one's
preferred OS is childish and self-indulgent and shows no respect
whatsoever for one's fellow human beings. Perl programming, and most
of what we do for a living is not life and death. We don't heal the
sick, or house the homeless, or feed the hungry. What we do can be fun
and challenging and interesting. And it takes a high degree of skill
and knowledge to do it. But that does not give Mr. Tom C. the right to
lambast anyone and everyone who does not conform to his world view or
use his preferred OS.
Mr. Bacon appears to belive he is capable and qualifed to determine
what is relevant within the context of the wider community of which he
is a part but seems unwilling to admit exists. MS WinXX may not be
great. It may not even be good. It may in fact be bad. As OS's go. But
that is all it is, an OS. Not bread, not water, not spiritual
sustenance (at least I hope not). To fail to recognize it, to fail to
acknowlege its widespread use, to fail to accept that it too has its
own cultural norms and behaviours may be a part of the problem in this
newsgroup and will certainly affect the content of a moderated
group. More than likely, based on the content of the replies I have
read thus far, it will force an unnecessary and potentially harmful
preferred-OS split and all the good that a multiple-platform
philosophy engenders will be lost to the passions of fanatics and
zealots only willing to exist within their own paradigm.
I am of two minds on the question of meoderation. Is moderation an
enforceable construct without loss? Or is moderation an attitude which
one gains through exposure to trial and tribulation and a willingness
to accept the teachings to be found within such experience? Will the
wider community benefit from enforced structural moderation? Or would
the wider community benefit from moderation applied personally by each
of us participating in this group? As the vote for a moderated group
will no doubt be a resounding success I doubt we will ever know.
In the end, I have been most impressed by Mr. T. Phoenix. He has
always remained civil and helpful in every post I have ever read. He
embodies moderation and I would implore each of us to follow that
example. We would all benefit greatly from such behaviour. Perhaps I
most of all.
Jim Brewer
------------------------------
Date: Wed, 10 Jun 1998 21:40:39 GMT
From: sommar@algonet.se (Erland Sommarskog)
Subject: Re: Am I looking at an anonymous array
Message-Id: <6lmugk$id0$1@cubacola.tninet.se>
kpreid@ibm.net (Kevin Reid) skriver:
>BTW, here's a revised version which doesn't require the second
>parameter:
>...
I guessed you could something like this, but obviously this is too
much overhead to determine whether I should give a warning or not.
I have no idea how many packages with how many variables the caller
has active. And if I can't tell there difference between a my-variable
and a anonymous array, it's useless anyway.
--
Erland Sommarskog, Stockholm, sommar@algonet.se
F=F6r =F6vrigt anser jag att QP b=F6r f=F6rst=F6ras.
B=65sid=65s, I think QP should b=65 d=65stroy=65d.
------------------------------
Date: Wed, 10 Jun 1998 21:44:59 GMT
From: sommar@algonet.se (Erland Sommarskog)
Subject: Re: Am I looking at an anonymous array
Message-Id: <6lmuop$id0$2@cubacola.tninet.se>
mikeh@minivend.com (Mike Heins) skriver:
>Of course -- a reference is a reference, which is why you can't tell.
>But if you are creating a named array, you must do so by declaring it;
>unless you are not using strict, as I would hope you are with such a
>complex application. When you declare the array, load it with an undef
>element and bless it. Don't bless an anonymous ref.
Unfortunately this is not feasable. This is a general Perl module,
and whether the called uses strict, blesses his arrays I have no
idea.
Besides blessing the in parameters could cause things go wrong, as the
procedure takes several parameters that you can left out, and I
deduce if a I have a certain parameter by see what C<ref> returns.
If does not say ARRAY, I don't have that parameter. (Hm, wonder if
the code police will come and put me under arrest for this.)
--
Erland Sommarskog, Stockholm, sommar@algonet.se
F=F6r =F6vrigt anser jag att QP b=F6r f=F6rst=F6ras.
B=65sid=65s, I think QP should b=65 d=65stroy=65d.
------------------------------
Date: 11 Jun 1998 11:36:22 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Am I looking at an anonymous array
Message-Id: <6loffm$pp9$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, sommar@algonet.se (Erland Sommarskog) writes:
:And if I can't tell there difference between a my-variable
:and a anonymous array, it's useless anyway.
You can't, and I'm pretty sure I said this already, although maybe
only under by breath. :-)
--tom
--
s = (unsigned char*)(SvPVX(sv)); /* deeper magic */
--Larry Wall, from util.c in the v5.0 perl distribution
------------------------------
Date: Thu, 11 Jun 1998 07:03:40 GMT
From: waulok@trust-me.com.SPAMLESS (Jason Oakley)
Subject: ascii to hex
Message-Id: <357f812b.29904871@news.oznetcom.com.au>
How do i convert eg. "hello21" into it's hex equiv of each
character?
------------
Jason Oakley - WebMaster & System Administrator
mailto:tech@comcen.com.au http://jump.to/ozisp
COM-CEN Internet Service Provider Pty Ltd
Sydney, Melbourne, Gosford (soon Penrith)
* Ph: 1800 555 001 Ph: 02 9436 1889 *
* Ph: 03 9419 3011 Fx: 02 9906 4620 *
* 6/87 Reserve Road ARTARMON 2064 *
The Net is the future, COMCEN is the key!
------------------------------
Date: 11 Jun 1998 11:24:35 +0100
From: jimbo@soundimages.co.uk
Subject: Re: Capitalizing acronyms (Re: Is PERL case sensitive?)
Message-Id: <uhg1s5j8c.fsf@JIMBOSNTSERVER.i-have-a-misconfigured-system-so-shoot-me>
Tom Christiansen <tchrist@mox.perl.com> writes:
> [courtesy cc of this posting sent to cited author via email]
>
> In comp.lang.perl.misc, jimbo@soundimages.co.uk writes:
> :acceptable form of usage but the form PERL is not incorrect or
> :inaccurate within the acronym context under any circumstance.
>
> You are assuming that the word is an acronym. But the word
> was invented before the supposed acronymic expansion, which
> is just revisionist history.
<tognue in cheek>
Well I wish people would stop revising then. From what I have read,
and this is direct from `perldoc perl`, Perl does indeed have the
aforesaid expansion and no mention of this being revisionist history
is made. Terribly sorry, old chap. Obviously, one must not believe
what one reads in the documentation these days. Won't happen again.
Until we meet, unless we don't.
Jim Brewer
------------------------------
Date: 11 Jun 1998 11:35:12 +0100
From: jimbo@soundimages.co.uk
Subject: Re: Capitalizing acronyms (Re: Is PERL case sensitive?)
Message-Id: <uemww5iqn.fsf@JIMBOSNTSERVER.i-have-a-misconfigured-system-so-shoot-me>
John Porter <jdporter@min.net> writes:
>
> jimbo@soundimages.co.uk wrote:
> >
> > Reuben remains correct. Although an acronym becomes a noun through
> > common usage, which is a beautiful feature of English, it still
> > retains it's origin as an acronym. This would certainly remain an
>
> What do you know about English?
> You put a superfluous apostrophe in "its".
I know without doubt, having read a good number of your posts, that
you have never, ever made a typo. It must be wonderful to be
perfect. In my opinion, the apostrophe is worse than superflous, it's
wrong. Wanting to show ownership of origin by the object of the
sentence, the acronym, I should have used a superflous apostrophe
after the 's', not between the 't' and 's'. Why I would use the
contraction for 'it is' there is truly beyond me. It not easy being
this stupid. Sorry.
Jim Brewer
------------------------------
Date: Thu, 11 Jun 1998 09:31:22 GMT
From: "Aloud.com" <alex@aloud.com>
Subject: Care to check a script of mine?
Message-Id: <357FA3EC.A5579195@aloud.com>
Hi,
I feel a bit like Dilbert in writing this question.
There are certain induhviduals who have requested a system to be built,
breifly, the scripts take input from a form, fires of a query to a
database (mySQL,DBD), sends the improved data to the other webserver
(LWP) and then printed out.
The induhviduals who commisioned the script aren't happy with the speed.
They have boosted the bandwith of the second webserver so the connection
is fast. Now that they have address everything else, the finger is now
pointing at our scripts. We don't know how to optimise the script any
further. Is there any one out there who would look over our script and
suggest areas of improvements?
I don't expect something for nothing, but we can discuss that
privately,
Alex Schajer
------------------------------
Date: 11 Jun 1998 10:18:01 GMT
From: Steffen Beyer <sb@sdm.de>
Subject: Re: CFV: comp.lang.perl.moderated moderated
Message-Id: <6loasp$3ol$2@bsdti6.sdm.de>
I apologize for being so late with my reply, but I was very busy lately
and had no access to mail and news for some time.
I also apologize for not posting to news:news.groups since I do not have
access to that newsgroup.
In news.announce.newgroups Mark-Jason Dominus <mjd@plover.com> wrote:
> REQUEST FOR DISCUSSION (RFD)
> moderated group comp.lang.perl.moderated
[...]
> The moderation panel will always consist of at least six
> members. New moderators may be appointed, and old ones removed,
> by a two-thirds majority vote of the moderation panel.
In other words, the people frequenting this newsgroup will have *NO*
democratic means of controlling the moderation panel.
(E.g., if a person from the moderation panel (or the moderation panel as
a whole) made arbitrary decisions, people frequenting the newsgroup would
have no means to remove that person from the panel, for example, or simply
to elect a different moderation panel.)
Who are the (self-appointed, after all) members of the moderation panel,
anyway?
I am greatly in favour of a moderated Perl newsgroup (I have been waiting
for it unpatiently for years), but I cannot vote in favour of it as long
as there is not the slightest hint of at least some democratic control.
Best regards,
--
Steffen Beyer <sb@engelschall.com>
Free Perl and C Software for Download: www.engelschall.com/u/sb/download/
"Perl is like sex: If you never had it, you wonder what the fuss is all
about. Once you had it, you never want to be without it again." (unknown)
------------------------------
Date: 11 Jun 1998 10:52:07 GMT
From: gerg@shell. (Greg Andrews)
Subject: Re: CFV: comp.lang.perl.moderated moderated
Message-Id: <6locsn$1q0$1@news.ncal.verio.com>
[de.comp.lang.perl removed from the newsgroups line]
sb@engelschall.com (Steffen Beyer) writes:
>
>I am greatly in favour of a moderated Perl newsgroup (I have been waiting
>for it unpatiently for years), but I cannot vote in favour of it as long
>as there is not the slightest hint of at least some democratic control.
>
The plainest form of democratic representation would mean questions
already answered in the FAQ would be allowed, since they are the
most numerous in c.l.p.m. Since that's one of the things the
people in favor of a moderated group are trying to get away from,
it wouldn't seem to be the best way.
What form of democracy do you have in mind?
-Greg
------------------------------
Date: Thu, 11 Jun 1998 11:51:04 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: CFV: comp.lang.perl.moderated moderated
Message-Id: <pudge-1106980745230001@dynamic174.ply.adelphia.net>
In article <6loasp$3ol$2@bsdti6.sdm.de>, sb@engelschall.com (Steffen
Beyer) wrote:
# > The moderation panel will always consist of at least six
# > members. New moderators may be appointed, and old ones removed,
# > by a two-thirds majority vote of the moderation panel.
#
# In other words, the people frequenting this newsgroup will have *NO*
# democratic means of controlling the moderation panel.
It does not say by what means they will be appointed. But the fact is
that in moderated newsgroups, the moderators get to do basically whatever
they want, including adding to and subtracting from their ranks. This is
par for the course on Usenet.
# (E.g., if a person from the moderation panel (or the moderation panel as
# a whole) made arbitrary decisions, people frequenting the newsgroup would
# have no means to remove that person from the panel, for example, or simply
# to elect a different moderation panel.)
By the charter, no, that is not guaranteed. It is not disallowed,
either. But it probably will not happen; votes are a complicated
procedure on Usenet.
# Who are the (self-appointed, after all) members of the moderation panel,
# anyway?
Read the RFD. Check DejaNews, look for the 2d RFD posted in May. And not
self-appointed; if you were interested, you could have volunteered
yourself or asked for consideration of someone else. Apparently, you did
not.
# I am greatly in favour of a moderated Perl newsgroup (I have been waiting
# for it unpatiently for years), but I cannot vote in favour of it as long
# as there is not the slightest hint of at least some democratic control.
There will not be in any moderated newsgroup. At least I know of none
that works that way, and I would not want to have to deal with it.
Besides, a "rogue moderator" would have much more to fear from his fellow
moderators than a vote. Fellow moderators would take swift and decisive
action. Left to the "voters", action would be slow to come, if at all.
I think you are just being a little bit paranoid there.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: Thu, 11 Jun 1998 09:33:23 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: Complete newbie question: Please help if possible!
Message-Id: <357F9653.39D7F938@nortel.co.uk>
angst wrote:
>
> ... I don't want to have to learn another programming
> : language just for this one script, if possible, but I guess I can if necessary.
> : : )
>
> If you don't wish to learn a programming language in order to write a
> program in that language, you're more than welcome to hire someone to do it
> for you. My personal rate is $75/hour.
That's what you get for programming? See, I am a student and haven't sniffed
into the programming world that much. Let's see...13'800 $ ??? (8hours a day, 23
days in a month). I am shocked. That's sort of what I will have earned at my
placement...in the whole year...Ay, caramba...
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: Thu, 11 Jun 1998 12:11:37 +0100
From: Andy Chantrill <support@derby-county.com>
Subject: linker counter
Message-Id: <357FBB68.320E11F8@derby-county.com>
i need a script to count how many times each unique visitor clicks on a
small graphic link to get to my site....i need to be able to see how
many times for each member of mu little link program...yoiu knoiw i pay
5c per every click through....i just need a simple script thats all....
reply to support@u2me3.com
cheers,
Andy.
------------------------------
Date: 11 Jun 1998 11:41:48 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: linker counter
Message-Id: <6lofps$pp9$3@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
Andy Chantrill <support@derby-county.com> writes:
:i need a script to count how many times each unique visitor clicks on a
:small graphic link to get to my site....i need to be able to see how
:many times for each member of mu little link program...yoiu knoiw i pay
:5c per every click through....i just need a simple script thats all....
I begin to understand: we have become alt.sources.wanted
for CGI, without knowing it.
Time to make new newsgroups? :-)
--tom
--
"The reason you subscribe to a mailing list is you don't get all
the crap you get on netnews. "
--Dennis Ritchie
------------------------------
Date: 11 Jun 1998 12:25:21 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: Number of digits in a string
Message-Id: <7x4sxsb5gu.fsf@beavis.vcpc.univie.ac.at>
Re: Number of digits in a string, Matt
<hex@voicenet.com> said:
>> need to check to make sure that this number has exactly
>> six digits. I looked in the camal manual and all I could
Matt> print "It's got 6 digits!\n" unless (($number <
Matt> 100_000) || ($number > 999_999));
Matt> Works nicely if you're only using decimel integers.
Sorry, there's no such beast as a "decimel [sic] integer".
You're thinking of "numerals".
Matt> Of course, you could use tr/// as well. I'm sure
Matt> you'll see plenty of replies telling you to RTF[FM]
Matt> concerning it.
perldoc perlre
/\d{6}/
hth
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, AT | http://www.vcpc.univie.ac.at/
"You see? You see? Your stupid minds! Stupid! Stupid!" ~ Eros, Plan9 fOS.
------------------------------
Date: 11 Jun 1998 11:39:43 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Number of digits in a string
Message-Id: <6loflv$pp9$2@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at> writes:
: /\d{6}/
Who took the anchors away?
--tom
--
MSDOS was created to keep idiots away from Unix
------------------------------
Date: Thu, 11 Jun 1998 00:56:29 GMT
From: ted <teds@linex.com>
Subject: Opening Files
Message-Id: <357F2B3A.602E@linex.com>
How would I open and read all the files in a folder without
naming the files in my script? I'm working with Macperl.
Would appreciate any help. Thanks in advance.
-Ted
teds@linex.com
------------------------------
Date: Thu, 11 Jun 1998 11:26:14 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: Opening Files
Message-Id: <357FB0C6.5C090CE1@nortel.co.uk>
ted wrote:
>
> How would I open and read all the files in a folder without
> naming the files in my script? I'm working with Macperl.
>
> Would appreciate any help. Thanks in advance.
>
> -Ted
> teds@linex.com
$dir = "/some/dir";
opendir(CB, "$dir") || die "Cannot opendir:$!";
foreach $file (sort readdir(CB)) {
print "Current file is: $file\n";
unless ($file eq "." || $file eq "..") {
open (FILE, "< $dir/$file") || die "Strange, but true: $!";
print "-- $file --\n";
print <FILE>;
close (FILE);
}
}
closedir(CB);
It took me 1 minute to answer your question, but almost 30 minutes to get the
conditional right. I know, this is not a Perl question, but why are the
following two conditionals not equivalent? Let me answer this myself...
if ($file ne "." || $file ne "..")
This won't work, e.g. when $file="." it is not equal "..",
therefore returning true for the if, and the other way round.
unless ($file eq "." || $file eq "..")
This works by exactly the same reason, as one of them will
always return true for $file=".",".."
Only for something completely different will
the statement be false, executing the unless block.
Sorry if I bored you here, but I wanted to write that down for myself :)
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: Thu, 11 Jun 1998 07:07:06 GMT
From: greene@gucc.org
Subject: Re: Prob in FAQ: Week of the year
Message-Id: <6lnvmq$h9t$1@nnrp1.dejanews.com>
A side question, along this thread -
is there an 'official' rule for determining week 1 of a year? When does week
53 end, and week 1 begin? Is there an ISO standard for this?
Just wondering...
--
# James Greene - Informatics Consulting - D-79539 Loerrach, Germany
# Internet: www.gucc.org/greene/consult - greene@gucc.org
# PGP Fingerprint: 8930 41E7 351B 56D8 801C D4D9 4C76 AF0F E24E F307
perl -we "$_=join'<',qw{d2by' f5e;f4z($iu w0@86yo=&ae b!097)l(&aa8vme
b$*};$_=unpack'u*',uc;print"
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Thu, 11 Jun 1998 12:58:54 +0100
From: lassehp@imv.aau.dk (Lasse =?ISO-8859-1?Q?Hiller=F8e?= Petersen)
Subject: Re: Prob in FAQ: Week of the year
Message-Id: <lassehp-1106981258550001@ra.imv.aau.dk>
In article <6lnvmq$h9t$1@nnrp1.dejanews.com>, greene@gucc.org wrote:
>Just wondering...
Find "Calendar FAQ" in news.answers or on rtfm.mit.edu. The ISO standard
is 8601.
-Lasse
------------------------------
Date: Thu, 11 Jun 1998 01:27:13 -0400
From: -bill- <bill@TechServSys.com>
Subject: problem compiling perl5.004_004
Message-Id: <357F6AB1.3359@TechServSys.com>
I posted this before and either:
the question/answers scrolled
they went into hyperspace
my newsreader doesn't like me
so forgive me if you have answered this before.
It would be nice if you would send me a courtesy email reply
when I get to "make" after the configure for perl5.004_04
I get the following error:
./miniperl configpm tmp
sh mv-if-diff tmp lib/Config.pm
File lib/Config.pm not changed.
AutoSplitting perl library
Making DynaLoader (static)
Making utilities
Making x2p stuff
`all' is up to date.
Making Fcntl (dynamic)
LD_RUN_PATH="" ld -o ../../lib/auto/Fcntl/Fcntl.so
-L/usr/local/lib -L/f/perl/sfio/lib Fcntl.o
undefined first referenced
symbol in file
__stat32 Fcntl.o
__fstat32 Fcntl.o
__lstat32 Fcntl.o
__statlstat32 Fcntl.o
Perl_croak Fcntl.o
errno Fcntl.o
strncmp Fcntl.o
strcmp Fcntl.o
Perl_stack_sp Fcntl.o
Perl_stack_base Fcntl.o
Perl_markstack_ptr Fcntl.o
Perl_na Fcntl.o
Perl_sv_2pv Fcntl.o
Perl_sv_2iv Fcntl.o
Perl_sv_newmortal Fcntl.o
Perl_sv_setnv Fcntl.o
Perl_Sv Fcntl.o
Perl_form Fcntl.o
perl_get_sv Fcntl.o
Perl_newXS Fcntl.o
Perl_sv_yes Fcntl.o
i386ld fatal: Symbol referencing errors. No output written to
../../lib/auto/Fcntl/Fcntl.so
*** Error code 13 (bu21)
*** Error code 1 (bu21)
--
-bill-
Technical Service Systems - bill@TechServSys.com
------------------------------
Date: Mon, 08 Jun 1998 12:14:59 +0200
From: Laurent LAVAUD <laurent.lavaud@u-bordeaux2.fr>
Subject: shadow password
Message-Id: <357BB9A3.64282CF7@u-bordeaux2.fr>
<HTML>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#3333FF" VLINK="#3333FF" ALINK="#3333FF">
Is thre any way to deal with shadowed passwords such as in C routines getspent()
for exemple?
<P>Thanks for yous answer, and forgive my english!
<PRE>--
Laurent LAVAUD
Université Victor Segalen Bordeaux 2
Département d'Informatique
146 rue Léo-Saignat Fax : 05 56 99 13 60
33076 Bordeaux cedex Tél : 05 57 57 16 36
Mél : Laurent.Lavaud@u-bordeaux2.fr</PRE>
</BODY>
</HTML>
------------------------------
Date: Thu, 11 Jun 1998 01:28:51 -0700
From: Jim Bowlin <bowlin@sirius.com>
To: Scott Bronson <sbronson@opentv.com>
Subject: Re: Stages in a pipeline
Message-Id: <357F9543.651F24AF@sirius.com>
Scott Bronson wrote:
>
> I've been programming in Perl for a few weeks now. Long enough to
> recognize that there must be an elegant(ish) Perl solution to this
> problem, but not long enough to know what it is.
>
> I've got a bunch of fucntions. All of them accept data as an argument,
> process it, and return the processed data as their result. The data is
> an array of lines, but that should be unimportant.
>
> Now, I'd like to set these functions up as a pipeline. One pipeline
> configuration would be:
>
> Print -> Format_Lists -> Number_Lines -> Remove_Header -> Get_Paragraph
>
> So, print calls Format Lists until Format_Lists returns null, printing
> out the data returned, and so on up the pipe. If I didn't want line
> numbers, I just re-order the stages in the pipe:
>
> Print -> Format_Lists -> Remove_Header -> Get_Paragraph
>
> And if I wanted headers and formatted lists, but no line numbers:
>
> Print -> Format_Lists -> Get_Paragraph
>
> You get the idea. What's an efficient, flexible way to set this up in
> Perl? Thanks,
>
> - Scott
>
> sbronson@opentv.com
Here is one way to do it.
sub get_paragraph { #--- return a list of lines
"header 1\n",
"header 2\n",
"\n",
"body 1\n",
"body 2\n",
"body 3\n",
"body 4\n",
}
sub strip_header { #--- strip up to and including "blank" line
while(@_) {
my $line = shift;
$line !~ /\S/ and last;
}
@_;
}
sub number_lines { #--- add line numbers
my ($i, @a);
foreach(@_) {
$i++;
push(@a, "$i: $_");
}
@a;
}
print number_lines strip_header get_paragraph;
# 1: body 1
# 2: body 2
# 3: body 3
# 4: body 4
Heres another way to do it that is more efficient but it mangles
the array and the data as it works. Instead of passing an array
from sub to sub, this one passes a reference to an array.
sub get_paragraph {
my $a = []; # create a new reference
push(@$a,
"header 1\n",
"header 2\n",
"\n",
"body 1\n",
"body 2\n",
"body 3\n",
"body 4\n",
);
$a;
}
sub strip_header {
my $a = shift;
while(@$a) {
my $line = shift @$a;
$line !~ /\S/ and last;
}
$a;
}
sub number_lines {
my $a = shift;
my $i;
foreach(@$a) {
$i++;
$_ = "$i: $_";
}
$a;
}
sub print_array {
my $a = shift;
print @$a;
}
print_array number_lines strip_header get_paragraph;
# same result
HTH -- Jim Bowlin
------------------------------
Date: Thu, 11 Jun 1998 18:21:35 +0800
From: Azman Shariff <azman@bnex.com>
Subject: taking data out of ':' delimited string and placing it into 6 variables
Message-Id: <357FAFAE.E21047EF@bnex.com>
hi....
i need a solution ..... I am quiet a novice in perl.... so maybe a few
poniters would do me good :)
data :
roger:1002:10004:Roger Deng:/home/roger:/bin/bash
looks familiar huh? .. .yepp it is from my passwd file.... i need to
write code to takethe six fields and put them in diff variables like
these
var:
$uname
$uid
$gid
$fullname
$home
$shell
how do i proceed? i tried this :
($fielduname, $fielduid, $fieldgid, $fieldfullname, $fieldhome,
$fieldshell) = split(/:/,$_,6);
doesn't seem to work though..
if therei s a solution pls email me at azman@bnex.com or
portal@pacific.net.sg
thanx in advance guys!
------------------------------
Date: Thu, 11 Jun 1998 09:21:29 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: Where is the robot?
Message-Id: <357F9389.326A7CF4@nortel.co.uk>
Thanks, John, I was getting a bit worried,
I mean, you know the Turing test. But yes, my counterparts seem to be human :)
> > open (THEBOTTLE, "< $with_a_screwdriver"); #!!!
> > Would you really do it?
>
> Heh, just because I say
>
> Always, but always check the result of open, like so:
> open (THEBOTTLE, "< $with_a_screwdriver")
> || die "error opening $with_a_screwdriver: $!";
>
> Doesn't mean I'm a robot. I'm not!
>
> John Porter
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 2837
**************************************