[11982] in Perl-Users-Digest
Perl-Users Digest, Issue: 5582 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 6 14:07:18 1999
Date: Thu, 6 May 99 11:00:27 -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, 6 May 1999 Volume: 8 Number: 5582
Today's topics:
Re: **Free CGI Scripts!** <cassell@mail.cor.epa.gov>
Re: a tail of two hashes (Greg Bacon)
aliasing hash elements <rgoldber@eb.com>
Re: anyone want to shoot uncle bill for me? <uri@sysarch.com>
Re: cheap perl scripts <cassell@mail.cor.epa.gov>
Re: Detecting screen resolution... (John Stanley)
Re: Detecting screen resolution... <cassell@mail.cor.epa.gov>
Re: Dumb Question <cassell@mail.cor.epa.gov>
END block and backtick command dave_ll_chen@my-dejanews.com
END block and backticks dave_ll_chen@my-dejanews.com
Re: Extracting Emails from TXT (Tad McClellan)
Re: having problems getting this script to work... <aqumsieh@matrox.com>
Re: having problems getting this script to work... (Bart Lateur)
Re: having problems getting this script to work... <uri@sysarch.com>
How to keep travelled path in hash ? (Michel Dalle)
Re: how to round off numbers? (Cim)
Re: how to round off numbers? <cassell@mail.cor.epa.gov>
Is there a version of CDDB written in Perl? (bobby)
Re: ISPs that offer cgi space?? <cassell@mail.cor.epa.gov>
Looking for a book ... marzoram@my-dejanews.com
Looking for a book ... marzoram@my-dejanews.com
Re: Modulo <cassell@mail.cor.epa.gov>
Re: Newbie: how do I use modules locally? <andy.georges@village.uunet.be>
Re: OReilly bullshit.... Camel logo trademark (David H. Adler)
perl debugger on NT <rmbw40@email.sps.mot.com>
PERLFUNC: abs - absolute value function <perlfaq-suggestions@perl.com>
PERLFUNC: accept - accept an incoming socket connect <perlfaq-suggestions@perl.com>
PERLFUNC: alarm - schedule a SIGALRM <perlfaq-suggestions@perl.com>
Re: procedure to convert sec to HH:MM:SS format (Larry Rosler)
Re: side effect of 'use integer'? (M.J.T. Guy)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 06 May 1999 10:08:38 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: **Free CGI Scripts!**
Message-Id: <3731CC96.FE16E072@mail.cor.epa.gov>
IlIIIIIIII wrote:
>
> get free CGI scripts at:
> http://tofs.cjb.net
One question:
Doesn't ANYONE know the difference between CGI and Perl?
Arrgggh.
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541) 754-4468
mathematical statistician fax: (541) 754-4716
------------------------------
Date: 6 May 1999 16:09:46 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: a tail of two hashes
Message-Id: <7gsesa$ng9$1@info2.uah.edu>
In article <7gscm1$1jd$1@nnrp1.deja.com>,
rjreilly@my-dejanews.com writes:
: sorry, my data follows: [slightly reformatted]
:
: %dmn = (
: 1 => 'east.foo.com',
: 2 => 'west.foo.com',
: 3 => 'south.foo.com',
: 4 => 'north.foo.com'
: );
:
: %dmnid = (
: 3345 => '1',
: 3346 => '1',
: 3347 => '4',
: 3349 => '2',
: 3398 => '3',
: 23399 => '2'
: );
:
: %dmn key is the domainname id and value is the domain name.
: %dmnid key is a unique database id and value is domainname id.
:
: what i would like to do is print the key from %dmnid and the value
: from %dmn where the domainid is the same..If i was using SQL i would
: do a join.
Ahh.. you want composition!
print "key = $key, value = $dmn{$dmnid{$key}}\n";
You could precompute your desired hash like
my %dmnid2dmn;
foreach my $id (keys %dmnid) {
$dmnid2dmn{$id} = $dmn{$dmnid{$id}};
}
Hope this helps,
Greg
--
When going to visit the woman, do not forget the whip.
-- Nietzsche
------------------------------
Date: Thu, 6 May 1999 12:29:28 -0500
From: RayG <rgoldber@eb.com>
Subject: aliasing hash elements
Message-Id: <Pine.GSO.3.96.990506122241.15456B-100000@cliff.eb.com>
i am trying to alias one hash element to another, such as $hash{a} is an
alias to $hash{b}. my first thought was *hash{a} = \$hash{b}, but that
does not work. i also tried using the Alias module from CPAN with no luck.
any other ideas?
thanks
------------------------------
Date: 06 May 1999 12:14:36 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: anyone want to shoot uncle bill for me?
Message-Id: <x71zguxjir.fsf@home.sysarch.com>
>>>>> "BL" == Bart Lateur <bart.lateur@skynet.be> writes:
BL> Uri Guttman wrote:
>> my boss knows what i did and is ok with it.
BL> You're boss knows you asked us to kill "bill"?
that was regarding the hack with the system call to perl. he is only my
boss on that contract.
but otherwise, i am my own boss!
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
------------------------------
Date: Thu, 06 May 1999 10:31:48 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: cheap perl scripts
Message-Id: <3731D204.2A1538D6@mail.cor.epa.gov>
David Cantrell wrote:
>
> On Thu, 22 Apr 1999 15:31:37 GMT, pejman@pejman.com enlightened us
> thusly:
>
> >I am looking for somebody, who can write me some small perl scripts
> >for small amount of money. Please let me know if you are interested
> >or if you know somebody who is willing to do that.
>
> Let me know what you want done then. And also let me know how small a
> 'small amount of money' is. Gotta make it worth my while ;-)
And be sure not to tell him that he can use one of the many web
search engines and find thousands upon thousands of Perl scripts
of one sort or another, because he might not realize he doesn't have
to pay for...
Oops, I just blew your consulting fee, didn't I? Sorry...
:-)
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541) 754-4468
mathematical statistician fax: (541) 754-4716
------------------------------
Date: 6 May 1999 17:16:20 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Detecting screen resolution...
Message-Id: <7gsip4$154$1@news.NERO.NET>
In article <373160a9@newsread3.dircon.co.uk>,
Jonathan Stowe <gellyfish@gellyfish.com> wrote:
>JB / MDO <jbdross@club-internet.fr> wrote:
>> Can somenone please help me ?
>>
>
>Not here they cant. I suppose we're talking browsers here right ?
>then I guess you'd better be asking in a group that is interested in
>the subject.
Besides, I don't know of any function that will return the screen
resolution. You can get the x and y pixel dimensions from the X server, I
think, but that isn't what this guy is asking for.
------------------------------
Date: Thu, 06 May 1999 10:39:07 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Detecting screen resolution...
Message-Id: <3731D3BB.3C31456E@mail.cor.epa.gov>
JB / MDO wrote:
>
> Can somenone please help me ?
>
> Or just give me a hint....
This really is a badly-phrased question. You're not giving us near
enough information to properly answer your question.
Are you talking about your browser? Go to one of the newsgroups
for your particular browser for that.
Are you talking about someone else's browser in a client-side setup?
Try one of the web authoring groups.
Are you talking about your monitor's screen resolution? That's
really OS and hardware specific, and you ought to be asking in
groups for your hardware and OS... Let me try using the PSI::ESP
module... Hmmm, you're using the French version of Netscape, a
browser, to read and post Usenet news instead of using a proper
newsreader... And I think you're using the international version
of Win95 too... That would be a registry issue to be asked in
one of the microsoft or win95 groups.
And you could be talking about windows you have open on your
screen, which is an even different issue. Or one of a dozen others.
But this does not appear to be a Perl problem, so it is not
appropriate to ask here.
> TIA
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541) 754-4468
mathematical statistician fax: (541) 754-4716
------------------------------
Date: Thu, 06 May 1999 10:21:20 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Dumb Question
Message-Id: <3731CF90.E16FC2BC@mail.cor.epa.gov>
Jody Fedor wrote:
>
> Jonathan Stowe wrote in message <7gq7qf$3ja$1@gellyfish.btinternet.com>...
> >use CGI qw(:standard);
> >
> >my @words = split / /,param('s');
> >
> >;-}
>
> Everyone suggests using modules but I think the overhead for CGI would be
> alot where just a few lines of matching code would do the trick. Is my
> thinking wrong here?
There is some overhead, but it is pretty small compared to some of the
other bottlenecks you might run into. Your thinking isn't *wrong*,
but you're getting ahead of yourself.
> Also, It's not really good to use a calculator (K-3) if you don't understand
Where were you when I was teaching math and stat to a bunch of droids?
:-)
> the basics. Using the simple s/// I'm learning the basics so when I see all
> this fancy code you guys are dishing out, I might be able to understand how
> they work. I'm working on becoming a mechanic not just the driver of the
> car!
But that's the point others are making. Until you are a certified
mechanic, you probably shouldn't be doing brake jobs on racing cars.
Working it out yourself is good, but so is Laziness - not re-inventing
the wheel until you cna do it better.. or at least as well. Look at
the code in CGI.pm and see how Lincoln Stein dealt with some of the
problems you're tackling. Look at HTML::Parser too.
> I appreciate everyones help on this and am learning alot from all the
> bantering. About * being greedy, I read that in the book! Now I know what
> it means! LOL.
So you see that Perl has a long (if shallow) learning curve. Hey, if
I use modules, and Uri uses them, and TomC uses them, then what's
wrong with using modules?
> Jody
Use the modules, Luke... :-)
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541) 754-4468
mathematical statistician fax: (541) 754-4716
------------------------------
Date: Thu, 06 May 1999 16:58:29 GMT
From: dave_ll_chen@my-dejanews.com
Subject: END block and backtick command
Message-Id: <7gshnj$6fh$1@nnrp1.deja.com>
Why doesn't this work as expected?
> perl -e 'exit 20; END { `false` }'; echo $?;
> echo $?
0
It's making me lose my exit codes.
thanks.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 06 May 1999 16:56:43 GMT
From: dave_ll_chen@my-dejanews.com
Subject: END block and backticks
Message-Id: <7gshk8$6dn$1@nnrp1.deja.com>
Why doesn't the following code work as expected? I'm losing my exit code.
> perl -e 'exit 20; END { `false` }'; echo $?;
> echo $?
0
Just curious.
Dave
dave_chen@usa.net
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 6 May 1999 07:19:40 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Extracting Emails from TXT
Message-Id: <cstrg7.s07.ln@magna.metronet.com>
joeyandsherry@mindspring.com wrote:
: I've been struggling with a script to extract emails from a txt file. Is
: there a way?
No, there is no way to do that.
: Trading Post.Com, L.L.C.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 6 May 1999 11:39:39 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: having problems getting this script to work...
Message-Id: <x3yiua6dx6t.fsf@tigre.matrox.com>
Uri Guttman <uri@ibnets.com> writes:
> this is the first time i have seen $, used for good and not for evil.
I am a regular user of $, $" $/ and $\
My usual use for $, is as follows:
{ local $, = ', '; print @array }
I would even argue that it has more good uses than evil ones ;-)
Ala
------------------------------
Date: Thu, 06 May 1999 17:03:19 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: having problems getting this script to work...
Message-Id: <3733cafd.483394@news.skynet.be>
Larry Rosler wrote:
>> {
>> local $\ = "\n";
>> print OUT foreach @data;
>> }
>
>Is your computer busted? I posted the benchmark code, as always, and
>several others have already posted variants.
Is your brain busted? ;-)
This variant is one that I didn't see. Note that $\ is set, but $, not.
Therefore it prints $_, not "$_\n".
Bart.
------------------------------
Date: 06 May 1999 13:12:13 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: having problems getting this script to work...
Message-Id: <x7pv4ew2aa.fsf@home.sysarch.com>
>>>>> "AQ" == Ala Qumsieh <aqumsieh@matrox.com> writes:
AQ> Uri Guttman <uri@ibnets.com> writes:
>> this is the first time i have seen $, used for good and not for evil.
AQ> I am a regular user of $, $" $/ and $\
AQ> My usual use for $, is as follows:
AQ> { local $, = ', '; print @array }
and i would do:
print join( ', ', @array);
which is shorter and faster. and probably clearer as most people don't
use $,
so show me where $, is more useful than join. again i can only imagine
awkish type -p/-n loops with maybe autosplit in there.
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
------------------------------
Date: Thu, 06 May 1999 17:43:02 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: How to keep travelled path in hash ?
Message-Id: <7gskak$qpq$1@news.mch.sbs.de>
Hi,
here is a little brain teaser. :-)
I want to keep track of the number of times a certain PATH is travelled
through a website/city/forrest/..., and I have a file containing the
the different pages/pubs/trees/... by each visitor.
E.g. : (who when where)
mike 01:52 post1
mike 01:53 post2
john 01:53 post3
mike 01:54 post1
john 01:55 post1
john 01:56 post2
mike 01:57 post3
john 01:58 post2
..
So mike followed the route post1->post2->post1->post3, and john
followed the route post3->post1->post2->post2.
Now, what would be the best hash/array structure to keep track of each
followed path, and find the most travelled path through my
website/city/forrest/... ? (I'll have thousands of people walking all over the
place)
I'm stuck trying to find both a memory-efficient and an easy-to-calculate
model. Could I re-use (part of) the existing Tree module (or any other) ?
Thanks for any pointers :-)
Michel.
------------------------------
Date: Thu, 06 May 1999 16:47:03 GMT
From: cim@online.ee (Cim)
Subject: Re: how to round off numbers?
Message-Id: <3731c6f9.105287986@news.uninet.ee>
On 6 May 1999 16:19:07 +0100, Jonathan Stowe <gellyfish@gellyfish.com>
wrote:
>Sorry which part of that FAQ or the functions it describes dont you
>understand ?
>
>What happens if you do this:
>
> printf("%.0f %.0f\n",$number1,$number2);
>
>With your example numbers for instance ?
>
mhm, yea but that will print. what if I have to use those numbers in
other functions etc. IS there a function that rounds numbers normally
or is there not?
cim.
------------------------------
Date: Thu, 06 May 1999 10:57:35 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: how to round off numbers?
Message-Id: <3731D80F.44ABB570@mail.cor.epa.gov>
Tim Armbruster wrote:
>
> Cim wrote in message <3732ac01.98382674@news.uninet.ee>...
> >On 6 May 1999 14:33:02 +0100, Jonathan Stowe <gellyfish@gellyfish.com>
> >wrote:
> >
> >Actually I have a similar problem. ceil() rounds 3.123 to 4 and
> >floor() to 3. But i need one that does it like round() function in
> >Excel - if it's 3.4 it rounds to 3 and if it's 3.6 it rounds to 4.
> >?
>
> Add .5 to your number
No no no no no. Umm, did I say `no'? :-)
Please don't do that. It doesn't handle the `integer+0.5' case
correctly in half the cases. Now if the probability of such a case
occurring in *your* application is zero, then fine, go ahead.
But sprintf is The Right Way here, and should be added to everyone's
toolbox anyway. Rounding off numbers is a good way to learn about
some of the power of sprintf() too.
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541) 754-4468
mathematical statistician fax: (541) 754-4716
------------------------------
Date: 6 May 1999 12:19:02 -0500
From: bobby@DIESPAMDIEbarnworth.com (bobby)
Subject: Is there a version of CDDB written in Perl?
Message-Id: <3731cfd4.93782792@news1.newscene.com>
I'm looking for a way to uniquely identify audio/data cd's and think
CDDB may be the way to go. Is there a version of CDDB written in Perl?
(I only care about generating some unique string so I can identify the
CD and don't really care about communicating with the cddb
server...yet).
Or is there some simply checksum type thingy I can do instead?
Thanks!
------------------------------
Date: Thu, 06 May 1999 10:50:50 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: ISPs that offer cgi space??
Message-Id: <3731D67A.CE40A1A8@mail.cor.epa.gov>
Miles R. Fidelman wrote:
>
> Mike Flaherty (mflaherty2@earthlink.net) wrote:
> : I haven't looked yet but this seems like to best place to start.
>
> : I am looking to start a web site for public use. I know there are plenty
> : of ISPs that offer web space - even for free. However, I want to use CGI
> : scripts and I will need access to a command line in order to develop/debug
> : them. This is a non issue for the stuff I write at work but do commercial
> : ISPs allow that kind of access?
>
> Shorenet (www.shore.net) does - at least for virtual hosts (definitely not
> free though).
>
> You might also try asking on:
> comp.infosystems.www.servers.unix
> comp.infosystems.www.authoring.cgi
Please Miles, don't encourage the troglodytes. The original question
was not appropropriate for this newsgroup. Your answer *was* helpful,
and I'm sure that Mike would have appreciated it just as much if you
had sent it in a private e-mail. He seems not ot have munged his
address due to some phobia about canned meat.
But his question is not appropriate for the *other* newsgroups you
named. Now he's liable to go pester more people who don't want to see
such posts in their newsgroups either. I trust you feel appropriately
guilty about this. :-)
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541) 754-4468
mathematical statistician fax: (541) 754-4716
------------------------------
Date: Thu, 06 May 1999 16:21:46 GMT
From: marzoram@my-dejanews.com
Subject: Looking for a book ...
Message-Id: <7gsfik$4f0$1@nnrp1.deja.com>
Hello,
Perl is the only language I have used until now for my job, but now I need to
learn C (for some network programming: Linux, NT). Can anybody recommend a
book on C which doesn't take me through all the "Hello World" programs and
somehow builds up on my prior knowledge of Perl? I.e the book shouldn't have
to cover basics like for and while loops extensively. All the books I've seen
all start will absolute basics. Is there a Camel book for C or something like
that, that can used as a reference?
Any reply appreciated, thanks in advance,
Marco
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 06 May 1999 16:21:41 GMT
From: marzoram@my-dejanews.com
Subject: Looking for a book ...
Message-Id: <7gsfif$4ev$1@nnrp1.deja.com>
Hello,
Perl is the only language I have used until now for my job, but now I need to
learn C (for some network programming: Linux, NT). Can anybody recommend a
book on C which doesn't take me through all the "Hello World" programs and
somehow builds up on my prior knowledge of Perl? I.e the book shouldn't have
to cover basics like for and while loops extensively. All the books I've seen
all start will absolute basics. Is there a Camel book for C or something like
that, that can used as a reference?
Any reply appreciated, thanks in advance,
Marco
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 06 May 1999 09:46:43 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Modulo
Message-Id: <3731C773.A05F9636@mail.cor.epa.gov>
Robert E Webb wrote:
>
> Mathematicians out there I have a question. I am currently in a debate over
> the correct answer to the following: -6 % 7. Perl, and MS Excel give the
> answer of 1. PHP gives the answer of -6. I emailed the developer, and he is
> saying that -6 is correct...
Well, he's wrong.
k modulo n is supposed to give exactly the same answer as
(k+n) modulo n or
(k-n) modulo n or
(k+42n) modulo n .
(-6 modulo 7) has to give the same answer as (-6+7 modulo 7)
which is of course (1 modulo 7), or 1.
Tell the developer of PHP that if he's so sure that he's right, he
needs to go look in an introductory number theory book, or go ask
in one of the sci.math newsgroups.
A few other points:
[1] This post is actually irrelevant to c.l.p.misc, and should
have gone to one of the sci.math groups instead.
[2] Don't let TomC or Uri find out that some BillWare gives the
same answer as Perl, where PHP doesn't. :-)
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541) 754-4468
mathematical statistician fax: (541) 754-4716
------------------------------
Date: Thu, 06 May 1999 18:07:11 +0200
From: Andy Georges <andy.georges@village.uunet.be>
Subject: Re: Newbie: how do I use modules locally?
Message-Id: <3731BE2E.EFDC89BD@village.uunet.be>
Hi,
>
> But it is not the right place to reask Frequently Asked Questions.
>
> It is poor netiquette to post to a newsgroup without checking
> the FAQ first.
>
I apologize.
>
> Perl FAQ, part 8:
>
> "How do I keep my own module/library directory?"
>
thanks.
Andy
--------------------------------------------------------------------------------
The new Congressmen say they're going to turn the government around. I
hope I don't get run over again.
--------------------------------------------------------------------------------
------------------------------
Date: 6 May 1999 13:03:05 -0400
From: dha@panix.com (David H. Adler)
Subject: Re: OReilly bullshit.... Camel logo trademark
Message-Id: <slrn7j3iq9.c4f.dha@panix.com>
On Thu, 6 May 1999 20:20:13 +0930, Wyzelli <wyzelli@yahoo.com> wrote:
>Is this a case of the law being an Ass? And what is the relation of an Ass
>to a Camel?
package Dickens;
s/an ass/a ass/i;
David H. "Details are my life..." Adler
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
I shall \0x0D - Nathan Roberts
------------------------------
Date: Thu, 06 May 1999 10:05:05 -0700
From: Denise Pool-Kalvelage <rmbw40@email.sps.mot.com>
Subject: perl debugger on NT
Message-Id: <3731CBBF.AD74B361@email.sps.mot.com>
This is a multi-part message in MIME format.
--------------663A0824D0B8A7566D3976AF
Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854"; x-mac-creator="4D4F5353"
Content-Transfer-Encoding: 7bit
Presently I send perl programs to a unix computer to run and debug
them. Is there a version of perl and a debugger that runs on NT or
windows?
thanks,
dpk
--------------663A0824D0B8A7566D3976AF
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Pool-Kalvelage, Denise
Content-Disposition: attachment; filename="vcard.vcf"
begin: vcard
fn: Denise Pool-Kalvelage
n: Pool-Kalvelage;Denise
org: Motorola -- CISD
adr;dom: ;;2200 W. Broadway;M200;AZ;85202;
email;internet: rmbw40@email.sps.mot.com
title: Intranet Technology Developer
tel;work: 480-6554901
tel;fax: pager: 18003510739
tel;home: alphapage: 3510739@skytel.com
note: 10078274
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard
--------------663A0824D0B8A7566D3976AF--
------------------------------
Date: 6 May 1999 10:13:54 -0700
From: Tom Christiansen <perlfaq-suggestions@perl.com>
Subject: PERLFUNC: abs - absolute value function
Message-Id: <3731bfc2@cs.colorado.edu>
(This excerpt is from the perlfunc manpage, part of the standard set of
documentation included with every valid Perl distribution--like the one on
your own system. See also http://language.perl.com/newdocs/pod/perlfunc/
if your negligent system adminstrator has been remiss in his duties.)
NAME
abs - absolute value function
SYNOPSIS
abs VALUE
abs
DESCRIPTION
Returns the absolute value of its argument. If VALUE is omitted,
uses `$_'.
--
+Our knowledge can only be finite, while our ignorance must necessarily be
infinite.; (Karl Popper)
------------------------------
Date: 6 May 1999 10:14:23 -0700
From: Tom Christiansen <perlfaq-suggestions@perl.com>
Subject: PERLFUNC: accept - accept an incoming socket connect
Message-Id: <3731bfdf@cs.colorado.edu>
(This excerpt is from the perlfunc manpage, part of the standard set of
documentation included with every valid Perl distribution--like the one on
your own system. See also http://language.perl.com/newdocs/pod/perlfunc/
if your negligent system adminstrator has been remiss in his duties.)
NAME
accept - accept an incoming socket connect
SYNOPSIS
accept NEWSOCKET,GENERICSOCKET
DESCRIPTION
Accepts an incoming socket connect, just as the accept(2) system
call does. Returns the packed address if it succeeded, FALSE
otherwise. See the example in the section on "Sockets:
Client/Server Communication" in the perlipc manpage.
--
Every program has at least one bug and can be shortened by at least one
instruction --from which, by induction, one can deduce that every
program can be reduced to one instruction which doesn't work.
------------------------------
Date: 6 May 1999 10:20:01 -0700
From: Tom Christiansen <perlfaq-suggestions@perl.com>
Subject: PERLFUNC: alarm - schedule a SIGALRM
Message-Id: <3731c131@cs.colorado.edu>
(This excerpt is from the perlfunc manpage, part of the standard set of
documentation included with every valid Perl distribution--like the one on
your own system. See also http://language.perl.com/newdocs/pod/perlfunc/
if your negligent system adminstrator has been remiss in his duties.)
NAME
alarm - schedule a SIGALRM
SYNOPSIS
alarm SECONDS
alarm
DESCRIPTION
Arranges to have a SIGALRM delivered to this process after the
specified number of seconds have elapsed. If SECONDS is not
specified, the value stored in `$_' is used. (On some machines,
unfortunately, the elapsed time may be up to one second less than
you specified because of how seconds are counted.) Only one timer
may be counting at once. Each call disables the previous timer, and
an argument of `0' may be supplied to cancel the previous timer
without starting a new one. The returned value is the amount of
time remaining on the previous timer.
For delays of finer granularity than one second, you may use Perl's
four-argument version of select() leaving the first three arguments
undefined, or you might be able to use the `syscall' interface to
access setitimer(2) if your system supports it. The Time::HiRes
module from CPAN may also prove useful.
It is usually a mistake to intermix `alarm' and `sleep' calls.
If you want to use `alarm' to time out a system call you need to
use an `eval'/`die' pair. You can't rely on the alarm causing the
system call to fail with `$!' set to `EINTR' because Perl sets up
signal handlers to restart system calls on some systems. Using
`eval'/`die' always works, modulo the caveats given in the section
on "Signals" in the perlipc manpage.
eval {
local $SIG{ALRM} = sub { die "alarm\n" }; # NB: \n required
alarm $timeout;
$nread = sysread SOCKET, $buffer, $size;
alarm 0;
};
if ($@) {
die unless $@ eq "alarm\n"; # propagate unexpected errors
# timed out
}
else {
# didn't
}
--
"Why do trans-atlantic transfers take so long?"
"Electrons don't swim very fast." -john@minster.york.ac.uk and whh@PacBell.COM
------------------------------
Date: Thu, 6 May 1999 09:25:14 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: procedure to convert sec to HH:MM:SS format
Message-Id: <MPG.119b6240fef9f1f09899dc@nntp.hpl.hp.com>
In article <slrn7j3b8l.mv.cederstrom@vortex.cede.net> on Thu, 6 May 1999
17:54:13 +0300, Juho Cederstrom <cederstrom@kolumbus.REMOVE_THIS.fi>
says...
> On Wed, 05 May 1999 15:29:38 +0200,
> peter <godzila@freemail.nl> wrote:
> > Can some one tell me how can I convert sec to a normal time format
> > hh:mm:ss.
>
> my @time = gmtime( $seconds );
> my $formatted =
> sprintf( "%02d:%02d:%02d", $time[2], $time[1], $time[0] );
>
> You can't use localtime instead of gmtime, because that won't give you
> correct results if you don't live in GMT.
What on earth (;-) do you mean by this? Using localtime should give you
the correct local time wherever you live. Using gmtime should give you
the correct UTC time wherever you live.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 6 May 1999 17:44:18 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: side effect of 'use integer'?
Message-Id: <7gskdi$eta$1@pegasus.csx.cam.ac.uk>
Uri Guttman <uri@sysarch.com> wrote:
>>>>>> "G" == GEMINI <dennis@info4.csie.nctu.edu.tw> writes:
> G> use integer;
> G> print "$h{-a},$h{-b},$h{-c}\n";
>
>try running with -w and see what it says.
Well, sort of. It tells you what is happening. But that's clearly a
bug. perlop says about unary minus:
Unary "-" performs arithmetic negation if the operand is
numeric. If the operand is an identifier, a string
consisting of a minus sign concatenated with the identifier
is returned. Otherwise, if the string starts with a plus or
minus, a string starting with the opposite sign is returned.
One effect of these rules is that -bareword is equivalent to
"-bareword".
No qualifications "this doesn't work under 'use integer'".
Reported to perlbug.
Mike Guy
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 5582
**************************************