[13481] in Perl-Users-Digest
Perl-Users Digest, Issue: 891 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Sep 23 17:17:26 1999
Date: Thu, 23 Sep 1999 14:05:15 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <938120715-v9-i891@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 23 Sep 1999 Volume: 9 Number: 891
Today's topics:
Re: (-d $filename) test (Vasile Calmatui)
Re: ./ -- why? (Randal L. Schwartz)
Re: ./ -- why? (Walter Pienciak)
[perl c exe switch off question] <tonyko@pacbell.net>
Re: Ad hominem (was Re: perl related question now!) (Damian Conway)
Re: Ad hominem (was Re: perl related question now!) <uri@sysarch.com>
Re: answers (Tony Kennick)
Re: applications of perl ?? <aqumsieh@matrox.com>
Re: applications of perl ?? <sariq@texas.net>
Re: combination (Greg Bacon)
Re: Comparing lines in two files using arrays. <tchrist@mox.perl.com>
dates gddt@my-deja.com
Re: dates <t.dillerNOkqSPAM@xpres.com>
Re: depreciated feature question <knetter@nortelnetworks.com>
Re: depreciated feature question (Alan Curry)
Difference between do and require.... <matchick@enteract.com>
Re: Difference between do and require.... <uri@sysarch.com>
Re: Grouping in REs, no doc found (Ilya Zakharevich)
Re: Grouping in REs, no doc found <ltl@rgsun5.viasystems.com>
How to RLOGIN <g-preston1@ti.com>
Re: I got thousands of CRACKS 'n SERIALS onlu for U !! <danestrom@poppulse.com>
Re: injecting "my" varibales into caller's scope (Sean McAfee)
Re: injecting "my" varibales into caller's scope <tchrist@mox.perl.com>
Re: memory use of children (Michael Stevens)
Re: perl multi-thread ? <tchrist@mox.perl.com>
Re: perl related question now! (Tony Kennick)
Re: Problems 'use'ing URI::URL and CGI in the same scri <ubu@easynet.ca>
Re: Problems 'use'ing URI::URL and CGI in the same scri mbarnicle@my-deja.com
Re: proper 'my' usage (Larry Rosler)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 23 Sep 1999 20:09:16 GMT
From: vasile@club-internet.fr (Vasile Calmatui)
Subject: Re: (-d $filename) test
Message-Id: <37ea82c5.5121970@news.club-internet.fr>
>> #concatenes two pathes and be sure a '\' is added between
>
>Ack! Don't *DO* that. Win32 can understand paths separated by '/' just
>as well.
You mean Win32 Perl "understand ...", isn't it ?
> Also, doing it that way means your routines are portable across
>many operating systems. The only reason (okay, I'm exaggerating a
>little) you should ever use '\\' in a Win32 system is when you're passing
>arguments to CMD.EXE.
You mean "passing arguments outside Perl", isn't it ?
>> chop($path) if($path=~/\\$/);
>
>You could do a "{ local $/ = '\\'; chomp($path); }" right there.
Wow, too complicated...
>Also, please reply *AFTER* what you quote. It makes it easier to see
>what you're replying to.
Ya, thanks,
--
Vasile Calmatui
vasile@club-internet.fr
http://www.chez.com/vasile/indexfr.html
------------------------------
Date: 23 Sep 1999 12:14:31 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: ./ -- why?
Message-Id: <m11zbpv3s8.fsf@halfdome.holdit.com>
>>>>> "Mike" == Mike Wescott <Mike.Wescott@ColumbiaSC.NCR.COM> writes:
Mike> Because "rm -rf ." removes nothing on many versions of Unix. Of the
Mike> three I had quick access to, two did nothing. Solaris7 (x86 and sparc)
Mike> and Linux (RH 6.0). The other (NCR's MP-RAS) removed everything but
Mike> "." and "..".
Doh!
I wonder what POSIX says about that. As one of my friends likes to say,
"that's counterintuitive!". Grrr.
I suspect V7 Unix (the One True Unix) worked "correctly", but
somewhere, the master formula was lost.
print "Just another Perl hacker," unless unlink ".";
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Thu, 23 Sep 1999 21:02:18 GMT
From: walter@io.frii.com (Walter Pienciak)
Subject: Re: ./ -- why?
Message-Id: <uzwG3.27$ffd.170826240@news.frii.net>
In article <m11zbpv3s8.fsf@halfdome.holdit.com>,
Randal L. Schwartz <merlyn@stonehenge.com> wrote:
>>>>>> "Mike" == Mike Wescott <Mike.Wescott@ColumbiaSC.NCR.COM> writes:
>
>Mike> Because "rm -rf ." removes nothing on many versions of Unix. Of the
>Mike> three I had quick access to, two did nothing. Solaris7 (x86 and sparc)
>Mike> and Linux (RH 6.0). The other (NCR's MP-RAS) removed everything but
>Mike> "." and "..".
>
>Doh!
>
>I wonder what POSIX says about that. As one of my friends likes to say,
>"that's counterintuitive!". Grrr.
>
>I suspect V7 Unix (the One True Unix) worked "correctly", but
>somewhere, the master formula was lost.
ISO/IEC 9945-2 1993 (IEEE Std 1003.2-1992) aka POSIX sez:
[Section 4.53.2]
The rm utility shall remove the directory entry specified by each file
argument.
If either of the files dot or dot-dot are specified as the basename
portion of an operand (i.e., the final pathname component), rm shall
write a diagnostic message to standard error and do nothing more with
such operands.
The Single UNIX (R) Specification, Version 2 (1997) says exactly the
same thing with minor editorial changes:
The rm utility removes the directory entry specified by each file
argument.
If either of the files dot or dot-dot are specified as the basename
portion of an operand (that is, the final pathname component), rm will
write a diagnostic message to standard error and do nothing more with
such operands.
Walter
------------------------------
Date: Thu, 23 Sep 1999 13:37:52 -0700
From: tonyko <tonyko@pacbell.net>
Subject: [perl c exe switch off question]
Message-Id: <37EA8F9F.F9A6A673@pacbell.net>
Is there a way to disable user's capability calling hisCprogram.exe from
inside his perlscript ?
Is there a way to figure out who I disable and who I did not from a perl
script ?
------------------------------
Date: 23 Sep 1999 19:39:35 GMT
From: damian@cs.monash.edu.au (Damian Conway)
Subject: Re: Ad hominem (was Re: perl related question now!)
Message-Id: <7sdvln$jnp$1@towncrier.cc.monash.edu.au>
Elaine -HFB- Ashton <elaine@chaos.wustl.edu> writes:
>> Yes. Hemogoblin, however...
>Ah, well, HemoGOBlin would look like this, of course :)
[gorgeous ASCII chiropteran deleted]
Looks more like the love child of Batgirl and Iron Man! ;-)
Damian
------------------------------
Date: 23 Sep 1999 16:29:32 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Ad hominem (was Re: perl related question now!)
Message-Id: <x7wvth2wyb.fsf@home.sysarch.com>
>>>>> "DC" == Damian Conway <damian@cs.monash.edu.au> writes:
DC> Elaine -HFB- Ashton <elaine@chaos.wustl.edu> writes:
>>> Yes. Hemogoblin, however...
>> Ah, well, HemoGOBlin would look like this, of course :)
DC> [gorgeous ASCII chiropteran deleted]
DC> Looks more like the love child of Batgirl and Iron Man! ;-)
doesn't hemogoblin translate to vampire bat?
:-)
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: Thu, 23 Sep 1999 19:37:36 GMT
From: tony@showroom.org.uk (Tony Kennick)
Subject: Re: answers
Message-Id: <37ea813e.37756421@missy.shef.ac.uk>
lt lindley <ltl@rgsun40.viasystems.com> imparted the following:
:->I think it must be because we don't have any beer here. usenet
:->groups should serve beer if they expect new posters to be friendly
:->and respectful.
I will bring some over from uk.food+drink.real-ale.
--
From Tony Kennick aka Gonzo The Great
http://missy.shef.ac.uk/users/old-firm/
Gonzo: Slang for "the last man standing
at a drinking marathon"
------------------------------
Date: Thu, 23 Sep 1999 14:46:47 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
To: S Vishwanath <vishx@mailcity.com>
Subject: Re: applications of perl ??
Message-Id: <x3ypuz9wjmw.fsf@tigre.matrox.com>
[posted and CCed]
S Vishwanath <vishx@mailcity.com> writes:
> can some body help me by elaborating the exact nature of use of perl
> (especially in vlsi design) .
What exactly do you want to know? Perl's use is exactly equivalent to
C's use (or any other language for that matter). Perl is just a
programming language.
(I hope you are not confusing it with Pearl, which is a proprietary
program by Cadence that does static timing analysis. The two are of
course totally unrelated)
I happen to be in the area of VLSI design, and I happen to use Perl a
lot in my work because I have to occasionally analyze and modify huge
text files (DEF, LEF, verilog, vhdl files which can easily be a few
hundred MBs large). In this respect, I find Perl very convenient and
fast (both to code and run) and have already developped many useful
tools in it to the extent that my manager (who doesn't know Perl) asks
any newly hired employees to learn Perl if they don't know it already.
Did you have anything more specific in mind?
HTH,
--Ala
------------------------------
Date: Thu, 23 Sep 1999 15:11:47 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: applications of perl ??
Message-Id: <37EA8983.514C4466@texas.net>
S Vishwanath wrote:
>
> can some body help me by elaborating the exact nature of use of perl
> (especially in vlsi design) .
>
> ~vishwanath
Read perlfaq1. If you don't have a Perl installation, the FAQs are
available at http://www.perl.com.
- Tom
------------------------------
Date: 23 Sep 1999 20:41:28 GMT
From: gbacon@ruby.itsc.uah.edu (Greg Bacon)
Subject: Re: combination
Message-Id: <7se39o$7ma$2@info2.uah.edu>
In article <7sdr1n$ibn$1@nnrp1.deja.com>,
sn0brdr@yahoo.com writes:
: i'm trying to get the most possible combination of elements from 3
: arrays (not equal in size).
:
: @one = qw(blue green yellow)
: @two = qw(john nancy)
: @three = qw(north south east west)
:
: no repeat and order matters.
my @combs;
foreach my $a (@one) {
foreach my $b (@two) {
foreach my $c (@three) {
push @combs, [$a, $b, $c];
}
}
}
If you wanted, you could take the resulting @combs and compute all
possible permutations of those too.
Greg
--
Must one first batter their ears, that they may learn to hear with
their eyes? Must one clatter like kettledrums and penitential
preachers? Or do they only believe the stammerer?
-- Nietzsche
------------------------------
Date: 23 Sep 1999 14:07:24 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Comparing lines in two files using arrays.
Message-Id: <37ea887c@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
"WyneGum" <keithcp@hotmail.com> writes:
:Could anyone tell me the best way to compare one line from one file with
:every line from another file, (each line in each file consists of only one
:word).
:Would it be best to use nested while loops and read the data in from two
:arrays, or a foreach inside of a while loop.
:Or, am I trying the hard way and there is a much easier way?
Yep. Learn about things like fgrep and comm.
--tom
--
It's there as a sop to former Ada programmers. :-)
--Larry Wall regarding 10_000_000 in <11556@jpl-devvax.JPL.NASA.GOV>
------------------------------
Date: Thu, 23 Sep 1999 19:16:12 GMT
From: gddt@my-deja.com
Subject: dates
Message-Id: <7sdu9d$l31$1@nnrp1.deja.com>
Hello Perl guru's can some one help me with ??
I would like to create a perl script to do the following.
key in a julian date such as 990923
and have it print corresponding date Thu Sep 23 12:11:03 MST 1999
is this possible ??
TIA
Garry
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 23 Sep 1999 12:46:49 -0700
From: Tim Diller <t.dillerNOkqSPAM@xpres.com>
Subject: Re: dates
Message-Id: <164c000c.1d27f627@usw-ex0108-057.remarq.com>
Hi!
I would check the Date:: module available on CPAN
http://www.cpan.org
Tim
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
------------------------------
Date: 23 Sep 1999 14:02:52 -0500
From: Scott Netterville <knetter@nortelnetworks.com>
Subject: Re: depreciated feature question
Message-Id: <n1gln9xmowz.fsf@nortelnetworks.com>
aaronurbain@bigfoot.com writes:
>my $a = 'xyz';
>my $b = 'ABCD';
>if ($a EQ $b)
>{
> print "equal";
>}
>else
>{
> print "snot equal";
>}
>
>gives me:
>Use of EQ is deprecated at export.pl line 11 (#1)
>
>
> (D) The construct indicated is no longer recommended for use,
>generally because there's a better way to do it, and also because the
>old way has bad side effects.
>
>Can someone offer the recommended way to compare two strings?
>
>-A
Use eq instead of EQ.
#!/usr/bin/perl -w
use diagnostics;
my $a = 'xyz';
my $b = 'ABCD';
if ($a eq $b)
{
print "equal";
}
else
{
print "snot equal\n";
}
__END__
The above gives:
snot equal
--
Scott Netterville
Email knetter@nortelnetworks.com
------------------------------
Date: Thu, 23 Sep 1999 19:07:22 GMT
From: pacman@defiant.cqc.com (Alan Curry)
Subject: Re: depreciated feature question
Message-Id: <KTuG3.6589$QJ.383268@typ11.nn.bcandid.com>
In article <7sdr9b$il1$1@nnrp1.deja.com>, <aaronurbain@bigfoot.com> wrote:
>Use of EQ is deprecated at export.pl line 11 (#1)
>Can someone offer the recommended way to compare two strings?
eq
not EQ
--
Alan Curry |Declaration of | _../\. ./\.._ ____. ____.
pacman@cqc.com|bigotries (should| [ | | ] / _> / _>
--------------+save some time): | \__/ \__/ \___: \___:
Linux,vim,trn,GPL,zsh,qmail,^H | "Screw you guys, I'm going home" -- Cartman
------------------------------
Date: Thu, 23 Sep 1999 21:12:23 +0100
From: "Brian Matchick" <matchick@enteract.com>
Subject: Difference between do and require....
Message-Id: <7se1ja$f9m6@nntp.cig.mot.com>
I'm writing some of my own libraries for some cgi programs and I can't
figure out the difference between calling do './whatever.pl' and require
'./whatever.pl'. They both seem to do the same thing, which is run the code
in the file.
Can anyone tell my the differences between the two?
Thanks!
Brian
------------------------------
Date: 23 Sep 1999 16:45:07 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Difference between do and require....
Message-Id: <x7puz92w8c.fsf@home.sysarch.com>
>>>>> "BM" == Brian Matchick <matchick@enteract.com> writes:
BM> I'm writing some of my own libraries for some cgi programs and I
BM> can't figure out the difference between calling do './whatever.pl'
BM> and require './whatever.pl'. They both seem to do the same thing,
BM> which is run the code in the file.
BM> Can anyone tell my the differences between the two?
you can't sing "require-be require-be require" and sound cool.
otherwise, rtfm and rtfaq as this is well documented.
also comp.lang.perl is a very dead newsgroup. followups corrected.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: 23 Sep 1999 19:25:07 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Grouping in REs, no doc found
Message-Id: <7sduqj$488$1@charm.magnus.acs.ohio-state.edu>
[A complimentary Cc of this posting was sent to lt lindley
<lee.lindley@bigfoot.com>],
who wrote in article <7sdr05$6bt$1@rguxd.viasystems.com>:
> :>The sad truth is that it leaves the value unchanged if the subpattern
> :>didn't match, or if it matched only as part of an unsuccessful pattern
> :>match.
>
> You are confusing "subpattern not matching" with "next regexp evaluation
> not matching". They are 2 different events.
Nope. There are still 4 or 5 known bugs in the REx engine, and the
mentioned above behaviour is one of them (though it happens for
"simple" groups only).
Ilya
------------------------------
Date: 23 Sep 1999 19:51:43 GMT
From: lt lindley <ltl@rgsun5.viasystems.com>
Subject: Re: Grouping in REs, no doc found
Message-Id: <7se0cf$7mt$1@rguxd.viasystems.com>
Ilya Zakharevich <ilya@math.ohio-state.edu> wrote:
:>[A complimentary Cc of this posting was sent to lt lindley
:><lee.lindley@bigfoot.com>],
:>who wrote in article <7sdr05$6bt$1@rguxd.viasystems.com>:
:>> :>The sad truth is that it leaves the value unchanged if the subpattern
:>> :>didn't match, or if it matched only as part of an unsuccessful pattern
:>> :>match.
:>>
:>> You are confusing "subpattern not matching" with "next regexp evaluation
:>> not matching". They are 2 different events.
:>Nope. There are still 4 or 5 known bugs in the REx engine, and the
:>mentioned above behaviour is one of them (though it happens for
:>"simple" groups only).
Which mentioned above behavior is a bug? That $1 is not reset after
an unsucessful match? If that is a bug it is a well documented one.
(though it is a behavior for which I can't see a good reason.)
What non-"simple" groups show a different behavior? Could you please
clarify this? A couple of examples would be nice.
--
// Lee.Lindley /// Programmer shortage? What programmer shortage?
// @bigfoot.com /// Only *cheap* programmers are in short supply.
//////////////////// 50 cent beers are in short supply too.
------------------------------
Date: Thu, 23 Sep 1999 15:39:14 -0500
From: Jerry Preston <g-preston1@ti.com>
Subject: How to RLOGIN
Message-Id: <37EA8FF2.B221A2C3@ti.com>
From with in my Perl program I need to "rlogin" this password and id to read
some data. How do I do this?
Thanks,
Jerry
------------------------------
Date: Thu, 23 Sep 1999 13:59:10 -0700
From: Dane Strom <danestrom@poppulse.com>
Subject: Re: I got thousands of CRACKS 'n SERIALS onlu for U !!
Message-Id: <37EA949E.9C4D4D80@poppulse.com>
Pawan Bhati wrote:
>
> HEY FRIENDS
> Your search for CRACKS 'n SERAILS comes to an end here.
> I got about 45k serials & 30k cracks on my new server. If you want you can
> have it all.
So, er, anyone going to help this poor, innocent fool? (insert
diabolical laugh)
--
danestrom@poppulse.com
http://www.popppulse.com
------------------------------
Date: Thu, 23 Sep 1999 19:29:39 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: injecting "my" varibales into caller's scope
Message-Id: <DcvG3.940$V7.156747@news.itd.umich.edu>
In article <37ea4bc8$0$204@nntp1.ba.best.com>,
Paul J. Lucas <pjl@be-NOSPAM-st.com> wrote:
> Is there you any way to inject "my" variables into a scope in
> Perl?
> sub injector {
> # Do something nifty using "caller" to inject a
> # variable "$foo" into caller's local scope.
> }
> sub func {
> injector( ..... );
> # the "my" varibale "$foo" now exists here
> }
> Normally, you can create variables with eval; but, to my
> knowledge, only into the caller's package not the caller's
> local scope.
Unqualified variable names are determined to be lexical or global at
compile time. At run time, it's too late to change anything (using pure
Perl, anyway; see below).
> Any ideas?
I suppose it's theoretically possible. Enormously difficult, but possible,
given an intimate familiarity with Perl's parsing code. Essentially your
injector function--which would have to be written in C--would traverse the
parse tree of the calling function, recompiling those portions that refer
to the variables that will be made lexical. For example:
sub func {
injector('$a', '@b') if $_[0] == 1;
$a = 10;
@b = (1, 2, 3);
print "$a @b";
}
When originally compiled by Perl, the $a and @b in func() would refer to
the global variables in the package func() is located in. injector() would
have to recompile func() on the fly to make $a and @b lexical, making this
change at every place they are used (eg, in the print() function above).
injector() would further need to arrange for the original parse tree to be
restored on exit from the function, perhaps by installing a hidden magical
lexical variable into func() which performs the restoration when it is
deallocated.
The scheme I describe above is probably the most bletcherous I've ever
conceived, and should not be attempted by anyone. Why not tell us what
you're trying to accomplish? I guarantee you that there's a better way to
do what you want.
--
Sean McAfee mcafee@umich.edu
print eval eval eval eval eval eval eval eval eval eval eval eval eval eval
q!q@q#q$q%q^q&q*q-q=q+q|q~q:q? Just Another Perl Hacker ?:~|+=-*&^%$#@!
------------------------------
Date: 23 Sep 1999 14:11:52 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: injecting "my" varibales into caller's scope
Message-Id: <37ea8988@cs.colorado.edu>
In comp.lang.perl.misc, "Paul J. Lucas" <pjl@best.com> writes:
: Is there you any way to inject "my" variables into a scope in
: Perl?
No. That would be evil and wrong. Why would you do this?
> P.S.: E-mail replies preferred; remember to despam my address.
That's your job, not mine. Don't post such stupid addresses.
You're giving in the criminals. Stop that. Fight them.
--tom
--
"Everything should be made as simple as possible, but not simpler."
-- Albert Einstein.
------------------------------
Date: 22 Sep 1999 21:07:40 GMT
From: mstevens@ashre.demon.co.uk (Michael Stevens)
Subject: Re: memory use of children
Message-Id: <slrn7uih8s.pa.mstevens@swirl.internal.fict>
On Wed, 22 Sep 1999 16:01:14 -0400, Elaine -HFB- Ashton <elaine@chaos.wustl.edu> wrote:
>lt lindley wrote:
>> :>sync;sync;reboot ;)
>> You really are ol.. um, well, you learned your sysadmin stuff a long ti..,
>> um, well, your sysadmin skills were established early in your career,
>> weren't they.
>Hey little boy, want some candy? :)
>I revel in each and every new grey hair.
>. o O ( I wonder how old he would think I am if I had used fastboot ...)
I've not tried it but under linux (with the sysvinit I have - debian-stable),
it looks like 'reboot -nf' might be much more fun. I'm trying to remeber
which command describes itself as being for use if a disk is on fire. I
think it's either halt or umount, but it may be on a BSD.
------------------------------
Date: 23 Sep 1999 13:59:06 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: perl multi-thread ?
Message-Id: <37ea868a@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
shawn fang <shawn@unifygroup.com> writes:
:I have a perl scripts that forks a lot of children. How can I reduce
:the footprint of those processes ?
Perl is big. Perl makes big processes. Forking is largely irrelevant
to this. If you change the data, then it costs, but only that.
Don't touch as much data, and it will stay shadowed.
Threading is not usually the answer. In fact, it's often a problem.
--tom
--
Cynic, n. A blackguard whose faulty vision sees things as they are, not as they
ought to be.
------------------------------
Date: Thu, 23 Sep 1999 19:29:58 GMT
From: tony@showroom.org.uk (Tony Kennick)
Subject: Re: perl related question now!
Message-Id: <37ea7f43.37249855@missy.shef.ac.uk>
Ala Qumsieh <aqumsieh@matrox.com> imparted the following:
:->
:->This word (ad hominem) popped up a couple of weeks ago in some post,
:->and suddenly everyone is using it (and I *still* don't know what it
:->means!).
:->
In Britain we would say, "Playing the man not the ball" as in
football, (real football, what some people would call soccer).
--
From Tony Kennick aka Gonzo The Great
http://missy.shef.ac.uk/users/old-firm/
Gonzo: Slang for "the last man standing
at a drinking marathon"
------------------------------
Date: Thu, 23 Sep 1999 18:57:57 GMT
From: Ubu <ubu@easynet.ca>
To: mbarnicle@my-deja.com
Subject: Re: Problems 'use'ing URI::URL and CGI in the same script
Message-Id: <7sdt7d$k5c$1@nnrp1.deja.com>
In article <7sdqkt$hue$1@nnrp1.deja.com>,
mbarnicle@my-deja.com wrote:
>
> I'm having trouble with the following code:
>
> use URI::URL;
> use CGI qw(:standard :escape :unescape);
>
> Prototype mismatch: sub main::url ($;$) vs none
> at /usr/local/lib/perl5/CGI.pm line 205.
>
The problem is that URL::URL exports a function url by default, and CGI
exports a function url as part of :standard. Your best bet would be to
either not import all the CGI functions into your namespace, and use the
object oriented mode, ie $query->url, or find an alternative to
URI::URL that doesn't have a conflicting function name.
I think it would be nicer if URI::URL exported it's url function
optionally, rather than by default, then you could choose with (if
either) you wanted to import into your namespace.
Hope this helps,
Barry
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 23 Sep 1999 19:18:04 GMT
From: mbarnicle@my-deja.com
Subject: Re: Problems 'use'ing URI::URL and CGI in the same script
Message-Id: <7sducu$l3r$1@nnrp1.deja.com>
In article <7sdt7d$k5c$1@nnrp1.deja.com>,
Ubu <ubu@easynet.ca> wrote:
> The problem is that URL::URL exports a function url by default, and
CGI...
> Hope this helps,
>
> Barry
Thanks a bunch. I'll look into it.
- Matt
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 23 Sep 1999 13:09:07 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: proper 'my' usage
Message-Id: <MPG.125428bc81639ed7989fc8@nntp.hpl.hp.com>
In article <37EA4A9A.E8FC1823@catnmoose.com> on Thu, 23 Sep 1999
11:43:22 -0400, Marty Landman <marty@catnmoose.com> says...
...
> for(my $i=0;$i<10;$i++) {...}
>
> Is there anything *bad* about having the my construct occur within the
> for loop above? Would it be better to code:
>
> my $i;
> for($i=0;$i<10;$i++) {...}
Reading code like that, I infer that the value of $i is used after the
loop. (For example, there might be an early exit from the loop.)
In your first case above, the limited scope of $i is explicit.
Any performance difference would be submicroscopic.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 891
*************************************