[8920] in Perl-Users-Digest
Perl-Users Digest, Issue: 2537 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 8 01:07:37 1998
Date: Thu, 7 May 98 22:00:40 -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, 7 May 1998 Volume: 8 Number: 2537
Today's topics:
Re: About perl online doc (Martien Verbruggen)
Re: Chicago Perl Mongers meeting May 8 (David Adler)
dup2 and fork and exec indhiraa@hotmail.com
Re: Dylan Song Title Generator (was Re: Rainy Day Women bobgill@erols.com
Re: Ever Wonder Why Not Everyone Uses Modules? (Leslie Mikesell)
Re: Ever Wonder Why Not Everyone Uses Modules? (Leslie Mikesell)
Re: Ever Wonder Why Not Everyone Uses Modules? <zenin@archive.rhps.org>
Re: Ever Wonder Why Not Everyone Uses Modules? <zenin@archive.rhps.org>
Re: Ever Wonder Why Not Everyone Uses Modules? <zenin@archive.rhps.org>
Re: Ever Wonder Why Not Everyone Uses Modules? <zenin@archive.rhps.org>
Re: Grieving our dying community (Jim Levie)
Help! This is drivin me nuts (rob zimmerman)
Re: how do i do this with a regular expression? <tchrist@mox.perl.com>
Re: how do i do this with a regular expression? (Tad McClellan)
Re: how do i keep range operator in list 'mode'?? <rootbeer@teleport.com>
Re: How to delete an element in an array? (Kevin Reid)
Re: How to delete an element in an array? <tchrist@mox.perl.com>
Re: Netscape/Perl trouble <rootbeer@teleport.com>
Newbie: changing $/ value <clay@crawlspace.com>
Re: perl script for zone files greg@lobodirect.com
Re: perl scripts dealing with /etc/passwd (Jim Levie)
Re: Perl/Wall lingo question <metcher@spider.herston.uq.edu.au>
Re: Perl/Wall lingo question <tchrist@mox.perl.com>
Problem with PerlFAQ (Jeff Yoak)
Re: Share an array among processes <rxk@cobra.jpl.nasa.gov>
Re: Share an array among processes <tchrist@mox.perl.com>
Re: Win95 Perl scripts DONT WORK on UNIX (Leslie Mikesell)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 8 May 1998 01:53:12 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: About perl online doc
Message-Id: <6itoi8$o7p$1@comdyn.comdyn.com.au>
In article <35524F61.D4469A44@163.net>,
chenmin <chenm@163.net> writes:
> Hi,
> I'm a beginner of Perl.Where can I get some online perl document or some
> related sources?
http://www.perl.com/
http://www.perl.org/
If you have already installed perl, you also should have documentation
installed.
# perldoc perl
# perldoc perldoc
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | Little girls, like butterflies, need no
Commercial Dynamics Pty. Ltd. | excuse - Lazarus Long
NSW, Australia |
------------------------------
Date: 8 May 1998 04:44:48 GMT
From: dha@panix.com (David Adler)
Subject: Re: Chicago Perl Mongers meeting May 8
Message-Id: <6iu2k0$9d@news1.panix.com>
On 5 May 1998 11:22:27 -0500, Jim Allenspach <jima@MCS.COM> wrote:
>petdance@maxx.mc.net (Andy Lester) writes:
>
>>Is it true that with the cuts in funding that the donuts and dancing girls
>>are being replaced with Cheerios and waddling old ladies?
>
> Not true! We still have them. They're just not actual size.
Ha! Not only have we New Yorkers kept our dancing chihuahua the same
size, we now have two! How about them apples?
Spreading anarchy and regional rivalry as I pass by...
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
The perversity of the Universe tends towards a maximum.
------------------------------
Date: Fri, 08 May 1998 03:17:33 GMT
From: indhiraa@hotmail.com
Subject: dup2 and fork and exec
Message-Id: <6ittgc$s64$1@nnrp1.dejanews.com>
Hi :
I have a program in which I redirect the STDOUT and STDERR
to files. This I do using dup2.
What will be the status of STDOUT and STDERR when i do fork and
then exec another program. In the program I exec where will the
STDOUT be directed to.
Thanks.
Indira.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Thu, 07 May 1998 20:27:01 -0700
From: bobgill@erols.com
Subject: Re: Dylan Song Title Generator (was Re: Rainy Day Women #12 & 35 question)
Message-Id: <35527B85.544@erols.com>
dave@nws.fsu.edu (David Faciane) writes:
>
> <In article <howells.894376052@shell4.ba.best.com>,
> <John Howells <howells@best.com> wrote:
> <>My opinion: the title means absolutely nothing. It's just some
> <>nonsense he thought up on the spur of the moment, like "Alcatraz
> <>to the 9th Power". That's just the way his mind works.
>
> <Indeed. Here's a quick little hack. Ever notice, during the mid-60s,
> <how Bob was fond of prefacing a rather mundane song title with an
> <adjective to kind of spice it up, as in
>
> <Positively Fourth Street
> <Obviously Five Believers
> <Absolutely Sweet Marie
>
This is a good observation, and I like this sort of thing, and I really
don't mean to sound pedantic, but these words that are being added are
all adverbs, not adjectives. Sometimes at the end of the title, too, like
"Queen Jane Approximately"; or parenthetically, like "(Sooner or Later)
One of Us Must Know". Or is it "One of Us Must Know (Sooner or Later)"?
-- Bob G.
------------------------------
Date: 7 May 1998 21:50:12 -0500
From: les@MCS.COM (Leslie Mikesell)
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <6itrt4$30o$1@Mercury.mcs.net>
In article <6iqsgp$fc6$1@news.nero.net>,
John Stanley <stanley@skyking.OCE.ORST.EDU> wrote:
>>Lots of places have firewalls in place that block outbound SMTP
>>from random internal machines (it is rather impolite to send things
>>from hosts that won't accept inbound connections).
>
>Where did this gem come from? It certainly is not impolite to do this.
>It's "best practice" to protect systems that have no need to accept
>sendmail connections from the ruffians who would try to use one to break
>in or attempt a DOS attack.
OK, I'll rephrase without the reasoning which may vary wildly. There
are many locations where arbitrary machines are blocked from reaching
other locations directly via SMTP. In these cases you must send
through the designated site gateway. If you have POP clients you will
also almost certainly have a reliable SMTP relay, but there is no
handy way to find it without manual configuration. Likewise you
won't know if your sendmail (if you have one) is correctly configured.
>As for your question why someone who doesn't want email replies would
>post something with his email address in it -- I think the excuse is
>"the RFC requires it". At least that is the argument against munging
>addresses.
There must have been some reasoning behind the RFC requirement. Like
people generally wanting to be able to get emailed replies...
Les Mikesell
les@mcs.com
------------------------------
Date: 7 May 1998 21:59:17 -0500
From: les@MCS.COM (Leslie Mikesell)
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <6itse5$34n$1@Mercury.mcs.net>
In article <3550FB97.8417322E@negia.net>,
Dan Boorstein <danboo@negia.net> wrote:
>> >Telling someone to "quit whining" when they mention they'd rather not
>> >receive email from you when you post is simply stupid.
>>
>> Huh? If you don't want replies, why post anything with your return
>> address on it?
>
>are you promoting the usage of fake addresses, or suggesting that the
>previous poster not post at all if he doesn't want e-mail replies?
I usually want replies, so I don't understand posting when you don't,
but there is no shortage of throwaway addresses (hotmail, juno, etc.)
if you don't like things in your work mailbox.
Les Mikesell
les@mcs.com
------------------------------
Date: 8 May 1998 03:07:35 GMT
From: Zenin <zenin@archive.rhps.org>
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <894597310.838511@thrush.omix.com>
Chris Nandor <pudge@pobox.com> wrote:
>snip<
Think about this; If where were printing files instead of sending
mail, would you me manually connecting to a remote lpd instead of
calling lpr? Think hard about this, because this is the *exact*
same case as with sending mail. The *exact* same case... Your
application is working at the *wrong* level of the protocal stack,
it's that simple.
--
-Zenin
zenin@archive.rhps.org
------------------------------
Date: 8 May 1998 03:14:19 GMT
From: Zenin <zenin@archive.rhps.org>
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <894597714.330099@thrush.omix.com>
Art Cohen <upsetter@shore.net> wrote:
: This is true, but (we've come back around to my original point now)
Hehe, funny how threads actually get back to the actual subject
once in a long while. :-)
: in a
: lot of real-world situations I just can't afford to spend x number of
: hours learning how to use a new module.
Agreed.
: There may be something on CPAN
: that does exactly what I want, but if I can't find it, learn it, install
: it and configure it before I get fired, I'm SOL.
It's a trade off, agreed. It really need to be seen on a case by
case basis. TMTOWTDI. I also must ship code to places that I have
no way of knowing that anything more then the standard distribution
is installed and so modules are out. -Or at least, anything that
needs C or is too complex to pack into one file easily.
: I'm not talking about writing my own code to parse HTML trees, or talk to
: an SMTP server... I'm talking about the reason why I communicate with
: Sendmail directly and use cgi-lib.pl over CGI.pm 9 times out of 10.
I'll agree with sendmail (if handled correctly, which is a task
in itself). I can kind of agree with CGI.pm too. While there
are sections in it's docs for cgi-lib.pl converts, they aren't
as clear as one might like and are buried a bit.
--
-Zenin
zenin@archive.rhps.org
------------------------------
Date: 8 May 1998 03:45:34 GMT
From: Zenin <zenin@archive.rhps.org>
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <894599589.494112@thrush.omix.com>
Chris Nandor <pudge@pobox.com> wrote:
>snip<
: Fine. Then it works this way:
: * your sysadmin changes the name of the mail server
: * your sysadmin responsibly lets you know
: * you notify him what needs to be changed, where, and how, maybe even making a
: diff for him
: Is this really that hard? If so, maybe I should become a consultant.
In companies that have entire *departments* that do nothing but
manage user accounts and still take 3 days to make a person an
account, it can easily take a week or more to get such a
global company change approved (4 levels of security and such
bunk) Even after that point, it can take a day or two to for it
just to propagate through the system from the build servers.
So yes, it really is that hard. This is also nothing close to
a special case. I've yet to work with a single company over 1k
employees that doesn't move like molasses, and with good reason.
You don't want to deploy massive system wide changes to thousands
of machines off the cuff and from some random developer's diff
file, much less an unknown consultant's advice that really
doesn't have anyone to answer to.
--
-Zenin
zenin@archive.rhps.org
------------------------------
Date: 8 May 1998 03:57:39 GMT
From: Zenin <zenin@archive.rhps.org>
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <894600314.84587@thrush.omix.com>
Paolo Ciccone <p-ciccone@usa.net> wrote:
>snip<
: My point was
: that since they are free and quite well documented and maintained in
: CPAN, criticizing them is really inappropriate.
Hmm, since I have made modules freely available at CPAN, would
I gain the right to criticize them? :-)
How does anyone ever learn if they get no feedback? It's one
of the main features of open source software. I welcome anyone
to come tear by code to bits and let me know exactly where I
endangered the entire future of the human race. Everyone makes
mistakes, and *everything* has a Better Way[tm] that it could
be done.
If you can't handle people criticizing your work, you'd better
stay out of software. It's a $dog->eat($doggy) world out there. :-)
--
-Zenin
zenin@archive.rhps.org
------------------------------
Date: Fri, 08 May 1998 04:03:24 GMT
From: Jim.Levie@dynetics.com (Jim Levie)
Subject: Re: Grieving our dying community
Message-Id: <35527da8.1591615@newstoo.hiwaay.net>
On 7 May 1998 15:34:28 GMT, nvp@shore.net (Nathan V. Patwardhan)
wrote:
>
>I'm not sure if I was stupid when I believed that Usenet was utopian.
>
>Or was I just dreaming the past (almost) decade away? Or was it both
>dreaming and stupidity? Whichever it was, I can't recall that I've
>*ever* seen a more selfish, boorish and misguided group of individuals
>than many of those I've seen on comp.lang.perl.misc.
>
>I'm not addressing the complaining per se, as there's always been
>complaining on Usenet (and everywhere), and I'm not downplaying
>people's criticisms of CPAN and Perl and attitudes, but I AM attacking
>many people here who lack the dedication to changing things when they
>don't suit the person.
>
>I remember a time (even up to a year or so ago) when people would
>complain about software or systems, BUT they'd write a patch so that
>the software could do what they wanted it to. They would submit this
>patch to the software's maintainer for approval. In all likelihood,
>this patch would benefit *many more people than one individual*, NOT
>just the one person who was seeking a fix.
>
While it isn't true for perl and CPAN, how many times do you see
sources posted for the utilities and tools that the "Point & Click"
generation likes. It wasn't that long ago when source postings were
the rule and binaries the excepion. I know that I learned a tremendous
amount from examination of various sources posted to the net. And I
know that I've contributed my share of patches when I tried to get
some package working... 'Cause you either built yourself or you didn't
use it.
>
>The "where do you want to go today?" generation has taken the
>developer out of the "programmer" by removing the vital, development
>tools from the environment and precanning software. In the "olden"
>days, developers were forced to build software themselves, and needed
>a thorough knowledge of these tools to do so. Now, the programmer is
>forced into *buying* their development tools -- and most M$ users
>don't/won't purchase these tools because most software is built to run
>out of the box.
>
And those building (non-commercial) those tools can't be persuaded to
part with the code, and frankly the way a lot of it works I suspect
that they just don't want anybody to see how bad the code really is.
>
>This has lead to hundreds IF NOT THOUSANDS of
>complaints about "broken" software WITHOUT most users offering ANY
>type of patch or constructive solution to the problems that they're
>experiencing. By not bundling their "operating system" with
>development tools, M$ has forced their users into helplessness by
>putting them in a situation of dependancy with software companies.
>
Not to mention the fact that the most interesting bits and pieces of
the M$ systems either aren't documented at all or are so poorly
documented as to require rather intensive efforts just to figure out
how it works.
------------------------------
Date: Fri, 08 May 1998 05:13:29 GMT
From: rob@[remove]mwv.org (rob zimmerman)
Subject: Help! This is drivin me nuts
Message-Id: <6itc68$627$1@newsy.ncia.net>
I cant figure this out. I am running Solaris2.5.1 Apache1.2.6 and
Perl5.04_4 and my perl scripts all seemed to take their good ole time
proccessing.
Sometimes they work, sometimes they dont. here is the error from the
log for a simple guesbook script:
cgi-lib.pl: Unknown Content-type:
[Thu May 7 21:52:19 1998] lingering close lost connection to client
207.141.176.82
The third time I tried it it worked? this is the worst kind of problem
to track..any ideas? Is it Apache? Im desperate....I have a whole
bunch of web stuff moving to this server and this stuff has gotta
work.....
Confused in the Mountains of NH
Rob Zimemrman
------
------------------------------
Date: 8 May 1998 02:06:27 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: how do i do this with a regular expression?
Message-Id: <6itpb3$6bj$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, Tom Phoenix <rootbeer@teleport.com> writes:
:> I use "(\d{1,2})(:\d{2}:\d{2}) PM" to recognize the date and put
:> the hour I want to add 12 to in $1, but how do I actually perform
:> addition on $1 in a s# # # statement?
:That may be your problem; perhaps you should be using a module.
Um, don't you think that that's overkill?
--tom
--
He who hasn't hacked assembly language as a youth has no
heart. He who does so as an adult has no brain.
------------------------------
Date: Thu, 7 May 1998 22:29:19 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: how do i do this with a regular expression?
Message-Id: <f6uti6.tml.ln@localhost>
Todd (feder001@csusm.edu.---) wrote:
: I'm trying to turn a date string with "PM" into 24-hour time with a
: regular expression:
: "4:06:50 PM" ==> "16:06:50"
: I use "(\d{1,2})(:\d{2}:\d{2}) PM" to recognize the date and put
: the hour I want to add 12 to in $1, but how do I actually perform
: addition on $1 in a s# # # statement? Thanks in advance for any
: help...
-----------------------
#!/usr/bin/perl -w
$_ = '4:06:50 PM';
#s/(\d{1,2})(:\d{2}:\d{2}) PM/$1+12 . $2/e;
s/(\d\d?)(:\d\d:\d\d) PM/$1+12 . $2/e;
print "$_\n";
-----------------------
perlop man page says:
=item s/PATTERN/REPLACEMENT/egimosx
...
Options are:
e Evaluate the right side as an expression.
...
...A C</e> will cause the
replacement portion to be interpreter as a full-fledged Perl expression
and eval()ed right then and there. It is, however, syntax checked at
compile-time.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 08 May 1998 02:09:43 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Gregory Coleman <coleman@library.ucsf.edu>
Subject: Re: how do i keep range operator in list 'mode'??
Message-Id: <Pine.GSO.3.96.980507190501.25820U-100000@user2.teleport.com>
On 8 May 1998, Gregory Coleman wrote:
> Well, all is swell throughout, ...until the numbers get big and the
> range operator suddenly switches its behavior and tries to evaluate the
> operand by comparing it to the file handle.
It sounds as if you're using the range operator in a scalar context. Is
that it? Of course, it shouldn't be suddenly switching it behavior!
> Specifically, it chokes on a big number:
>
> ID #: 2500040056/0057
Since that number is not terribly far above two-to-the-31, this raises
suspicions that it's a problem caused by having to switch from integer to
floating point.
> What would be helpful is a workaround or override that might make this
> possible. Am i overlooking something obvious here?
I'm not sure what you're trying to do. Do you want to get a list of
numbers within a certain range? This might be it.
$prefix = '250004';
$start = '0056';
$finish = '0057';
@range = map "$prefix$_", $start..$finish;
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Fri, 8 May 1998 00:13:42 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: How to delete an element in an array?
Message-Id: <1d8olp1.1mqebvz1eo5v3yN@slip166-72-108-233.ny.us.ibm.net>
Tom Christiansen <tchrist@mox.perl.com> wrote:
> :But for this person, the real, unasked
> :question is `what's the best way to do sets in Perl?', and the right
> :answer to this question is usually (not always, but usually) ``do sets
> :with hashes, not lists.''
>
> And that small remainder of the time, it's probably bit vectors.
Only applicable if your sets are made of small numbers.
--
Kevin Reid. | Macintosh.
"I'm me." | Think different.
------------------------------
Date: 8 May 1998 04:32:19 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How to delete an element in an array?
Message-Id: <6iu1sj$hug$2@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, kpreid@ibm.net (Kevin Reid) writes:
:Tom Christiansen <tchrist@mox.perl.com> wrote:
>mjd:But for this person, the real, unasked
>mjd:question is `what's the best way to do sets in Perl?', and the right
>mjd:answer to this question is usually (not always, but usually) ``do sets
>mjd:with hashes, not lists.''
:> And that small remainder of the time, it's probably bit vectors.
:Only applicable if your sets are made of small numbers.
Not true! It's applicable so long as you not have infinite
elements. Off the top of my head:
sub Set::contains {
my($vector, $element) = @_;
my $bitno = elt2bit($element);
return vec($Set::vector, $bitno, 1);
}
sub Set::add {
my($vector, @elements) = @_;
for my $element( @elements ) {
my $bitno = elt2bit($element);
vec($Set::vector, $bitno, 1) = 1;
}
}
sub Set::delete {
my($vector, @elements) = @_;
for my $element( @elements ) {
my $bitno = elt2bit($element);
vec($Set::vector, $bitno, 1) = 0;
}
}
sub Set::clear { $_[0] = '' if @_ }
sub Set::isempty { $_[0] =~ /^\0*$/i }
$Set::BITS_SEEN = 0;
sub Set::elt2bit {
my $name = shift;
unless (defined $Mapping{$name}) {
$Mapping{$name} = $BITS_SEEN++;
}
$Mapping{$name};
}
It's all pretty darn trivial. BTW, there's almost
certainly a module out there on CPAN that does this. :-)
--tom
--
Sorry. My testing organization is either too small, or too large, depending
on how you look at it. :-)
--Larry Wall in <1991Apr22.175438.8564@jpl-devvax.jpl.nasa.gov>
------------------------------
Date: Fri, 08 May 1998 02:02:48 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: "Randall S. Willcox" <rswillco@acs.ucalgary.ca>
Subject: Re: Netscape/Perl trouble
Message-Id: <Pine.GSO.3.96.980507190207.25820S-100000@user2.teleport.com>
On Thu, 7 May 1998, Randall S. Willcox wrote:
> It seems this happens only in Netscape 4.x.
If you're following the proper protocol but some browser or server doesn't
cooperate, then it's the other program's fault. If you're not following
the protocol, then it's your fault. If you aren't sure about the protocol,
you should read the protocol specification. If you've read it and you're
still not sure, you should ask in a newsgroup about the protocol.
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 07 May 1998 20:43:28 -0700
From: Clay Loveless <clay@crawlspace.com>
Subject: Newbie: changing $/ value
Message-Id: <35527F2E.40046E7A@crawlspace.com>
Hello --
I'm working on a script that needs multiple line input for one response.
Right before asking the question to prompt that response, I've put this line
in the script:
$/="###";
.... so that after I've entered my multiple lines, I type "###", hit enter, and
the script proceeds.
My problem:
How to I return to the default value of $/ ? I've tried the following:
$/="/n";
- and -
undef $/;
.... and neither seem to be working.
What's happening is that after getting the multiline input mentioned above,
attempts to answer the next question seem to just hang the script.
So ...
enter lines -- end with "###":
blah
blah
blah###
what's your name? clay
.....and I hit "enter" forever, and the script never goes forward.
Help!
Thanks,
Clay
clay@crawlspace.com
------------------------------
Date: Fri, 08 May 1998 03:04:02 GMT
From: greg@lobodirect.com
Subject: Re: perl script for zone files
Message-Id: <6itsn2$qtt$1@nnrp1.dejanews.com>
Assuming all your zone files are in the same dir for primary zones for
instance, this would be fairly simple.. Open the file, write to another, and
copy over the original. Just loop through all of the files in the dir..
-Greg
In article <35510477.A675F49C@interport.net>,
Tommy Ho <tch@interport.net> wrote:
>
> Hi,
>
> I'd like to run a script to modify lines in multiple DNS zone files. So
> if I need to change an "A" record or "NS" records on 50 different zone
> files all at once, I would need a perl script to do that.
>
> Does anyone have any experience with this?
>
> Thanks,
>
> Tommy
>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Fri, 08 May 1998 04:18:12 GMT
From: Jim.Levie@dynetics.com (Jim Levie)
Subject: Re: perl scripts dealing with /etc/passwd
Message-Id: <35538538.3528712@newstoo.hiwaay.net>
On Thu, 07 May 1998 14:40:42 -0400, Greg Piney
<greg_piney@mhc-smtp-mail.mcgraw-hill.com> wrote:
>Having tried something similar, Don't Do It. I Twice blew away a production
>/etc/passwd file while trying to futz with it.
>
I won't go so far as to say don't do it... I would say that you should
really understand what you're doing, especially if the system uses
shadow password files.
Since I like to be prepared for disasters, I started keeping all of
the user information necessary to reconstruct our NIS+ environment in
a database and wrote a set of perl scripts that can construct the
files needed to build the hosts, password, shadow, and auto_home
tables from the data stored in the database and to give each user
credentials once NIS+ was back up. I've used the process three times
in the last two years and never had any problems... so it can be done.
>David A. Lyons wrote:
>
>> Somebody please point me to a resource where I can analyze perl scripts
>> that do various things to the /etc/passwd file, like add, remove,
>> change, view, sort entries, check password, etc. I don't know perl, but
>> ***TEXT DELETED ***
>
>
>
>> Dave
>
>
------------------------------
Date: Fri, 08 May 1998 14:11:54 +1000
From: Jaime Metcher <metcher@spider.herston.uq.edu.au>
Subject: Re: Perl/Wall lingo question
Message-Id: <35528609.125139E8@spider.herston.uq.edu.au>
Stephen O. Lidie wrote:
>
> Ken Fox (kfox@pt0204.pto.ford.com) wrote:
> : Some people seem to think so anyways. ;) When was the last time
> : you formally proved the correctness of a program? Now when was the
> : last time you built an outline of a program? IMHO, computer science
> : (except for algorithm design and analysis) is much more closely
> : related to writing (i.e. literature).
>
> Hmm. A computer nerd by trade but a biologist by degree, I've always
> held this hierarchy, in Makefile terminology:
>
> biology: chemistry
> chemistry: physics
> physics: mathematics
>
> e.g., the world view is described by mathematics.
>
> Where to classify CS or linguistics? Ultimately it's a biological
> function. I think.
These hierarchies are fine for academia, but most computing, like
problems such as Getting Through The Day, Getting to Your Mother's Place
by Public Transport on a Holiday, Building Things, etc, falls into that
great amorphous bag called Engineering. Things that don't *really* have
a theoretical basis, but that we presume will work because they worked
before, or are kind of like something that worked before. As an
approach it's easy to sneer at, but one of the great challenges facing
Applied Mathematicians is finding problems that a) can be solved, b)
anybody cares about, and c) haven't already been solved empirically.
(Not that I have any problem at all with people working on things that
nobody cares about.)
So my vote is for computer science as a branch of Engineering, which is
based on anything deemed to be useful.
--
Jaime Metcher
------------------------------
Date: 8 May 1998 04:40:14 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl/Wall lingo question
Message-Id: <6iu2be$hug$3@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
Jaime Metcher <metcher@spider.herston.uq.edu.au> writes:
:So my vote is for computer science as a branch of Engineering, which is
:based on anything deemed to be useful.
Computer science is math.
Computer engineering is hardware.
Software engineering is art.
Not that math isn't.
--tom
--
Actually, you'll know we're nearing the end when I make |$foo| mean
"absolute value"... :-) Larry Wall in <1994Feb25.192042.17196@netlabs.com>
------------------------------
Date: Fri, 08 May 1998 03:41:02 GMT
From: jeff@yoak.com (Jeff Yoak)
Subject: Problem with PerlFAQ
Message-Id: <6ituq2$glo@sjx-ixn8.ix.netcom.com>
perlfaq contains the following:
How to contribute to this document
You may mail corrections, additions, and suggestions to
perlfaq-suggestions@perl.com. Mail sent to the old perlfaq alias will
merely cause the FAQ to be sent to you.
(End Quote)
If mail sent to this address is going to be subjected to Tom C's mail
filters so that people using ISPs that Tom doesn't approve of can't
contribute, the faq might mention that so those of us who fall into
that category wouldn't bother sending a message in the first place.
Message follows for anyone who may be interested.
Cheers,
Jeff
--
The original message was received at Thu, 7 May 1998 21:22:30 -0600
from dfw-ix9.ix.netcom.com [206.214.98.9]
----- The following addresses have delivery notifications -----
"|/home/tchrist/.audit_mail tchrist" (unrecoverable error)
(expanded from: tchrist)
----- Transcript of session follows -----
Mail from known spam-hosting site rejected [\bix\.netcom\.com]
554 "|/home/tchrist/.audit_mail tchrist"... Service unavailable
----- Original message follows -----
Return-Path: jeff@yoak.com
Received: from dfw-ix9.ix.netcom.com (dfw-ix9.ix.netcom.com
[206.214.98.9]) by jhereg.perl.com (8.7.4/8.7.3) with ESMTP id
VAA24907 for <perlfaq-suggestions@perl.com>; Thu, 7 May 1998 21:22:30
-0600
Received: (from smap@localhost)
by dfw-ix9.ix.netcom.com (8.8.4/8.8.4)
id WAA17052 for <perlfaq-suggestions@perl.com.>; Thu, 7 May 1998
22:21:57 -0500 (CDT)
Received: from stp-fl1-12.ix.netcom.com(205.184.151.44) by
dfw-ix9.ix.netcom.com via smap (V1.3)
id rma017035; Thu May 7 22:21:42 1998
Message-Id: <3.0.1.32.19980507231828.0322288c@popd.ix.netcom.com>
X-Sender: yoak@popd.ix.netcom.com
X-Mailer: Windows Eudora Pro Version 3.0.1 (32)
Date: Thu, 07 May 1998 23:18:28 -0400
To: perlfaq-suggestions@perl.com
From: Jeff Yoak <jeff@yoak.com>
Subject: PerlFAQ Error
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Hi Guys,
When accessing the following URL
http://www.perl.com/CPAN-local/doc/FAQs/FAQ/PerlFAQ.html the links in
this
section:
http://www.perl.com/CPAN-local/doc/FAQs/FAQ/PerlFAQ.html#How_do_I_learn_abou
t_object_orie are broken.
Cheers,
Jeff
--
Jeff Yoak jeff@yoak.com
------------------------------
Date: Thu, 07 May 1998 11:00:10 +0000
From: Razmik Khachikyan <rxk@cobra.jpl.nasa.gov>
Subject: Re: Share an array among processes
Message-Id: <35519439.680E4AD9@calstatela.edu>
The simplified version of the problem is the following:
I have 3 processes and 3x3 matrix. Each process calculates the sum of a
column(i.e process 1 calculates the sum of the first column). At this point
each process has a single value. I would like to store this values in an array
such that after killing the child processes, the values would not be lost and
the mother process can access them. Therefore I need to have an shared array.
Thanks in advance.
Razmik
Martien Verbruggen wrote:
> In article <354F04BC.9F065AFB@cobra.jpl.nasa.gov>,
> Razmik Khachikyan <rxk@cobra.jpl.nasa.gov> writes:
> > Does anyone know how to share an array?
>
> Share an array with what? What are you trying to accomplish? You might
> need to be a bit more specific and verbose.
>
> Martien
> --
> Martien Verbruggen |
> Webmaster www.tradingpost.com.au | Begin at the beginning and go on till
> Commercial Dynamics Pty. Ltd. | you come to the end; then stop.
> NSW, Australia |
------------------------------
Date: 8 May 1998 04:22:28 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Share an array among processes
Message-Id: <6iu1a4$hug$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
Razmik Khachikyan <rxk@cobra.jpl.nasa.gov> writes:
:The simplified version of the problem is the following:
:I have 3 processes and 3x3 matrix. Each process calculates the sum of a
:column(i.e process 1 calculates the sum of the first column). At this point
:each process has a single value. I would like to store this values in an array
:such that after killing the child processes, the values would not be lost and
:the mother process can access them. Therefore I need to have an shared array.
Then you need the IPC::Shareable module. But what a waste for nine
elements.
--tom
--
That means I'll have to use $ans to suppress newlines now.
Life is ridiculous.
--Larry Wall in Configure from the perl distribution
------------------------------
Date: 7 May 1998 22:11:37 -0500
From: les@MCS.COM (Leslie Mikesell)
Subject: Re: Win95 Perl scripts DONT WORK on UNIX
Message-Id: <6itt59$91a$1@Mercury.mcs.net>
In article <3551B005.24E32D90@inlink.com>,
Brent Michalski <perlguy@technologist.com> wrote:
>> > The reason is that Windows (or DOS) puts a
>> > character "^M" after a line, and UNIX perl
>> > does NOT understand this character.
>
>Perl DOES understand this character, it just shouldn't be there so it
>generates an error!
Is there some reason it isn't treated as white space? I thought
postscript got this right - why not perl?
Les Mikesell
les@mcs.com
------------------------------
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 2537
**************************************