[8599] in Perl-Users-Digest
Perl-Users Digest, Issue: 2216 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Mar 31 13:07:58 1998
Date: Tue, 31 Mar 98 10:00:28 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 31 Mar 1998 Volume: 8 Number: 2216
Today's topics:
Re: 2$b || !2$b ? ; <wellss@iren.net>
Re: accessing variables EXPORTed then "use"d <Richard.Schofield@fmr.com>
Re: Anon Scalar Expression (was: Evaluate expression in (David A. Black)
Dynamic Executables on HP-UX 10 with GCC <zkessin@shell1.tiac.net>
Re: file trees <jdf@pobox.com>
Re: filecopy on Windows (Nick Tonkin)
Re: filecopy on Windows (M.J.T. Guy)
God Help Us All (was: Re: Sneex having problems) <jdporter@min.net>
Re: God Help Us All (was: Re: Sneex having problems) (Andre L.)
Re: Grap Images from a remote web site <budr@tanet.net>
Re: MSEXCHANGE / OUTLOOK <jdf@pobox.com>
Re: Need help with "shared memory" module IPC::Shareabl (Jason Gloudon)
Re: Number of Perl Users/Instalitations. (brian d foy)
Re: Number Sorting (Abigail)
Re: Odd or even function <tchrist@mox.perl.com>
Re: Odd or even function (Abigail)
Re: Odd or even function (M.J.T. Guy)
Re: Odd or even function <jdporter@min.net>
Re: Perl BNF/Perl parser <merlyn@stonehenge.com>
perl for Oracle database interface (jlk)
Re: Registration fees for TCP 2.0. (Nick Tonkin)
Re: Registration fees for TCP 2.0. <jdporter@min.net>
Re: Registration fees for TCP 2.0. (Abigail)
Re: Script Headers (Andrew M. Langmead)
Re: small letters into capital letter <jefpin@bergen.org>
Re: Suppressing "used only once" <jdporter@min.net>
Re: The "Y2k-bugs-are-not-just-a-legacy-problem" FAQ ("Paul E. Bennett")
Re: The "Y2k-bugs-are-not-just-a-legacy-problem" FAQ <m.mcdowell@bigfoot.com>
Re: ts: why have "push" and "unshift"? (Kevin B Cohen)
Re: works form cmd line only <jamesr@aethos.co.uk.nospam>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 31 Mar 1998 10:19:05 -0600
From: Steve Wells <wellss@iren.net>
Subject: Re: 2$b || !2$b ? ;
Message-Id: <35211779.72AF6B6B@iren.net>
/[tis]!$bell/ or /(suffer)\1/ [sic]
STEVE
---------
Steve Wells
http://www.iren.net/wellss
brian_r_parkes@hotmail.com wrote:
>
> $that = (@ISA = qw(question)); [sic]
>
> In article <6fdpps$bd$1@plug.news.pipex.net>,
> "David Rayner" <david@thames.com> wrote:
> >
> > 2$b || !2$b ? ;
> >
> > I'm having trouble get this Perl script to work, in fact it's
> > turning out to something of a tragedy <G>
> >
> >
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Tue, 31 Mar 1998 11:52:48 -0500
From: Rick Schofield <Richard.Schofield@fmr.com>
Subject: Re: accessing variables EXPORTed then "use"d
Message-Id: <35211F60.68DD0289@fmr.com>
I think I can answer my own question here.
As long as the "use Socket;" line came after the "package myftp" line, I could
read the value of PF_INET by addressing it as-is:
$pf_inet = PF_INET;
print "pf_inet = $pf_inet\n";
(OUTPUT)
pf_inet = 1
If (as I had it) the "use" comes _before_ the "package", then
it places the constants from Socket.pm outside of the namespace of the
package, resulting in the following output from the code above:
(OUTPUT)
pf_inet = PF_INET
I'm not sure if it would have worked in the second instance if I'd referred to
it as "main::PF_INET". Anyone know the right syntax?
Rick
------------------------------
Date: Tue, 31 Mar 1998 12:34:53 EST
From: dblack@saturn.superlink.net (David A. Black)
Subject: Re: Anon Scalar Expression (was: Evaluate expression inside print "")
Message-Id: <6fr9ft$i2g$1@earth.superlink.net>
Hello -
John Porter <jdporter@min.net> writes:
>Jim Stern wrote:
>>
>> print "@{[$var+1]}\n"; # Evaluates in an array context
>> print "${my $v=$var+1;\$v}\n"; # Evaluates in a scalar context
>So my question is, Why doesn't perl have an operator to
>generate ref-to-anon-scalar the way it does for arrays
>and hashes?
>In other words -- if < and > were the special delimiters --
>we could have said:
>print "${<$var+1>}\n";
I wonder if the non-existence of such an operator has to do with
the singular status of scalars - that is, the fact that in most
cases (other than double-quote interpolation) this:
${<$var+1>}
would just be a roundabout way of writing this:
$var + 1
whereas the [] and {} operators allow for conversion and handling,
as/via scalars, of things which weren't already scalars.
Not to say, of course, that references to scalars are useless - only
examining the case of going from scalar value to ref to scalar value in
the course of one expression. I'm curious, actually, to know where (other
than in double-quote interpolation) one would need/want that syntax.
Hmmmm.... somewhere in all this, though not very lucidly, I think I'm
beginning to understand why it makes sense for \($x,$y,$z) to evaluate
to a list of refs....
Also - perhaps the hypothetical <> operator would conflict, logically
and/or syntactically, with symbolic references?
David Black
dblack@saturn.superlink.net
------------------------------
Date: 31 Mar 1998 10:17:34 -0500
From: Zach Kessin <zkessin@shell1.tiac.net>
Subject: Dynamic Executables on HP-UX 10 with GCC
Message-Id: <yc7ogymsxdd.fsf@shell1.tiac.net>
I am trying to compile a dynamic binnary on HP-UX 10 with gcc. I can
get a static binnary ok but I dont know how to get a dynamic binnary.
--Thanks.
--Zach
------------------------------
Date: 31 Mar 1998 08:26:03 -0500
From: Jonathan Feinberg <jdf@pobox.com>
Subject: Re: file trees
Message-Id: <67kvj8k4.fsf@mailhost.panix.com>
ehood@medusa.acs.uci.edu (Earl Hood) writes:
> sub files_to_list {
[snip 40 lines of code]
I normally don't do spelling flames, but you misspelled
use File::Recurse;
recurse { push @file_list, $_ } '/directory';
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
------------------------------
Date: Tue, 31 Mar 1998 15:30:25 GMT
From: nick@NOSPAMTHANKSciof.sbcc.net (Nick Tonkin)
Subject: Re: filecopy on Windows
Message-Id: <35210bc7.381847427@news.silcom.com>
On Tue, 31 Mar 1998 11:42:26 +0200, Emile Schenk
<emile.schenk@siemens.at> wrote:
You might want to look into File::Copy on CPAN. Just a guess but it
sounds like it might do what you want. While you're there you might
poke around and see what other modules are available . . . their names
can quite often be informative . . .
Nick
>Question from a newbie:
>
>How do I copy a file in PERL (Windows)? I tried
>system("copy a.a b.b")
>but this doesn't work.
>
>Thanks for any hints!
>
>****************************************************
>Emile Schenk
> Siemens AG Austria
> Tel 0043 1 1707 37521
> Email emile.schenk@siemens.at
>****************************************************
------------------------------
Date: 31 Mar 1998 17:34:08 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: filecopy on Windows
Message-Id: <6fr9eg$21m$1@lyra.csx.cam.ac.uk>
Nick Tonkin <nick@NOSPAMTHANKSciof.sbcc.net> wrote:
>You might want to look into File::Copy on CPAN. Just a guess but it
>sounds like it might do what you want.
No need to go to CPAN - it's part of the standard distribution.
Mike Guy
------------------------------
Date: Tue, 31 Mar 1998 10:16:11 -0500
From: John Porter <jdporter@min.net>
Subject: God Help Us All (was: Re: Sneex having problems)
Message-Id: <352108BB.1035@min.net>
And some people wonder "what's so bad about being a newbie".
Between 10 March (when this guy first crashed in here) and
22 March, he posted over 100 messages, and yet managed to
contribute absolutely zilch to the technical content of
this newsgroup. I'm not sure what Mark Stackhouse has in mind
when his says he's "knowledgeable AND a class A-1 guy (see his
posts here)", but I've read every one of those posts, and
I think Mark is being generous, to say the least.
"His server's down? Oh my! What ever shall we do!"
Does he have any clue what it takes to be appreciated,
and subsequently missed?
Suddenly that "newbie chat group" doesn't sound so bad...
John Porter
------------------------------
Date: Tue, 31 Mar 1998 11:36:19 -0500
From: alecler@cam.org (Andre L.)
Subject: Re: God Help Us All (was: Re: Sneex having problems)
Message-Id: <alecler-3103981136190001@dialup-802.hip.cam.org>
Please take this to alt.personal.vendettas.
Live && let live.
A.L.
========================
In article <352108BB.1035@min.net>, jdporter@min.net wrote:
> And some people wonder "what's so bad about being a newbie".
>
> Between 10 March (when this guy first crashed in here) and
> 22 March, he posted over 100 messages, and yet managed to
> contribute absolutely zilch to the technical content of
> this newsgroup. I'm not sure what Mark Stackhouse has in mind
> when his says he's "knowledgeable AND a class A-1 guy (see his
> posts here)", but I've read every one of those posts, and
> I think Mark is being generous, to say the least.
>
> "His server's down? Oh my! What ever shall we do!"
> Does he have any clue what it takes to be appreciated,
> and subsequently missed?
>
> Suddenly that "newbie chat group" doesn't sound so bad...
>
> John Porter
------------------------------
Date: 30 Mar 1998 08:27:57 -0600
From: Bud Rogers <budr@tanet.net>
To: news@alameh.net
Subject: Re: Grap Images from a remote web site
Message-Id: <m2afa8nthu.fsf@twocups.tanet.net>
news@alameh.net writes:
> hi there every body, I am using the http-lib from selena sol to make a get
> request and get a remote web page, what i am looking more for is a way to
> get the images and any thing more i can from the page, remotly, simply i am
> doing the get and then the page is a string, i can gather all the links to
> images but how i can read the images, is it the same way i did to read
> html??????? and in other words i am looking for a way to download images
> from remote web pages to my unix server using a perl program, a big kiss
> from every body can help in this (cyber kiss no body ask me to come and
> give) Regards it is me Issam
Perhaps you would find wget useful. Wget is an excellent http/ftp
retrieval tool written by Hrvoje Niksic. It is written in c rather than
perl, but I think it would do what you want. It allows great flexibility
and control of what types of files are downloaded. It is meant to run
unattended, from cron scripts and such, or from the command line.
>From the readme:
Like all GNU utilities, the latest version of Wget can be found at the
master GNU archive site prep.ai.mit.edu, and its mirrors. For
example, Wget 1.4.5 is at:
<URL:ftp://prep.ai.mit.edu/pub/gnu/wget-1.4.5.tar.gz>.
The latest version is also available via FTP from the maintainer's
machine, at:
<URL:ftp://gnjilux.cc.fer.hr/pub/unix/util/wget/wget.tar.gz>.
This location is mirrored at:
<URL:ftp://sunsite.auc.dk/pub/infosystems/wget/> and
<URL:http://sunsite.auc.dk/ftp/pub/infosystems/wget/>.
--
Bud Rogers <budr@tanet.net>
------------------------------
Date: 31 Mar 1998 08:37:52 -0500
From: Jonathan Feinberg <jdf@pobox.com>
Subject: Re: MSEXCHANGE / OUTLOOK
Message-Id: <3efzj80f.fsf@mailhost.panix.com>
Ronald J Kimball <rjk@coos.dartmouth.edu> writes:
> Pascal AMRAM wrote:
> > Subject: MSEXCHANGE / OUTLOOK
>
> So here I am trying to figure out what an M sex change is....
It's obviously the opposite of an F sex change. HTH.
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
------------------------------
Date: Tue, 31 Mar 1998 15:19:06 GMT
From: jgloudon@manitoba.bbn.com (Jason Gloudon)
Subject: Re: Need help with "shared memory" module IPC::Shareable !
Message-Id: <slrn6i226d.jnt.jgloudon@manitoba.bbn.com>
Zenin <zenin@archive.rhps.org> wrote:
> I still would like an answer if the use of __DIE__ and __WARN__
> suffer from the same major problems that the use of any "real"
> signals have when used in perl. -Perl signals are vary, vary
> unsafe for any use...
__DIE__ and __WARN__ handlers should be safer than signal handlers because they
are not executed in signal handlers contexts which is why signal handlers in
any language on most UNIX-like operating systems have limited use.
--
Jason Gloudon
------------------------------
Date: Tue, 31 Mar 1998 04:54:09 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Number of Perl Users/Instalitations.
Message-Id: <comdog-3103980454090001@news.panix.com>
Keywords: just another new york perl hacker
In article <3520823B.6C0397B9@doitnow.com>, "John C. Quillan" <quillan@doitnow.com> posted:
> Any information based on Number of Downloads, Number of books sold,
> etc.. would be
> helpfull.
number of books sold won't be very useful since i know quite a few
people that own multiple copies of the Camel and so on :) i've
personally downloaded the same version of perl several times, so
you would have he same problem with that figure as well.
--
brian d foy <http://computerdog.com>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>
let's hope there aren't 300,000 "i use perl" posts...
------------------------------
Date: 31 Mar 1998 16:56:49 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Number Sorting
Message-Id: <6fr78h$2u6$1@client2.news.psi.net>
Dan Serban (judas@interprice.com) wrote on MDCLXXIII September MCMXCIII
in <URL: news:6fqetf$bad$1@news.junction.net>:
++ I am creating a script which needs to output a set of numbers in human
++ readable sortation.
@array = (32, 11, 992, 321);
$, = $\ = "\n";
print map {sort @$_} grep {$_} do {map {push @{$_[length]} => $_} @array; @_};
Abigail
--
perl -pwle '$_ .= reverse'
------------------------------
Date: 31 Mar 1998 14:57:25 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Odd or even function
Message-Id: <6fr08l$ohd$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
Casper Kvan Clausen <ckc@dmi.dk> writes:
:> Which leads to the obvious
:> chomp($number); # integer divide by 10
:
:chomp() is much more useful than chop(); so much so, apparently, that
:even our own Tom C. has forgotten about chop()!
Well, ok. I guess $/ = '0' doesn't win much. :-)
(See the p5p list/newsgroup.)
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
"Any computer scientist who praises orthogonality should be sentenced to
use an Etch-a-Sketch."
--Larry Wall
------------------------------
Date: 31 Mar 1998 16:34:33 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Odd or even function
Message-Id: <6fr5up$2b4$3@client2.news.psi.net>
Tom Christiansen (tchrist@mox.perl.com) wrote on MDCLXXIII September
MCMXCIII in <URL: news:6fqm8t$hm2$1@csnews.cs.colorado.edu>:
++ [courtesy cc of this posting sent to cited author via email]
++
++ In comp.lang.perl.misc, "Dan Serban" <judas@interprice.com> writes:
++ :Is there an odd or even perl function that could be used as a boolean
++ :operator?
++
++ You've just asked if there's a function to tell whether something is
++ a multiple of 2. It requires only the most remedial understanding
++ of mathematics to do. I don't know why people keep asking this.
++ It's like they never went to math class or something. Here are two
++ trivial solutions. The first is slow. Use the second.
++
++ if ($number % 2) { print "$number is odd" } # silly way
++ if ($number & 1) { print "$number is odd" } # good way
++
++ unless ($number % 2) { print "$number is even" } # silly way
++ unless ($number & 1) { print "$number is even" } # good way
Well, I wouldn't call it the "silly way", after all:
++ This can be extended to other numbers like this:
++
++ if ($number % 10) { print "$number not multiple of 10" }
++ unless ($number % 10) { print "$number is multiple of 10" }
Right. It's the "silly way" that's extendable, not the "good way".
A handful of nanoseconds doesn't determine the difference between
good and silly.
++ Actually, with 10, you can be smarter:
++
++ if (substr($,-1)) { print "$number not multiple of 10" }
++ unless (substr($,-1)) { print "$number is multiple of 10" }
++
++ Which leads to the obvious
++
++ chomp($number); # integer divide by 10
YM: chop.
++ and also
++
++ $log10i = length($number);
Which gets it wrong on powers of 10, and every integer less than 2.
Abigail
--
perl -wle '$_ = 1; (1 x $_) !~ /^(11+)\1+$/ && print while $_ ++'
------------------------------
Date: 31 Mar 1998 17:26:07 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Odd or even function
Message-Id: <6fr8vf$1p9$1@lyra.csx.cam.ac.uk>
Tom Christiansen <tchrist@mox.perl.com> wrote:
>Which leads to the obvious
>
> chomp($number); # integer divide by 10
I think you mean
chop($number) if $number;
Mike Guy
------------------------------
Date: Tue, 31 Mar 1998 12:31:56 -0500
From: John Porter <jdporter@min.net>
Subject: Re: Odd or even function
Message-Id: <3521288B.4B29@min.net>
In <6fr5up$2b4$3@client2.news.psi.net>, abigail@fnx.com (Haijo Schipper)
wrote:
>
> Tom Christiansen (tchrist@mox.perl.com) wrote on MDCLXXIII September
> MCMXCIII in <URL: news:6fqm8t$hm2$1@csnews.cs.colorado.edu>:
> ++
> ++ This can be extended to other numbers like this:
> ++
> ++ if ($number % 10) { print "$number not multiple of 10" }
> ++ unless ($number % 10) { print "$number is multiple of 10" }
>
> Right. It's the "silly way" that's extendable, not the "good way".
>
> A handful of nanoseconds doesn't determine the difference between
> good and silly.
I guess that quite depends on how much your program needs to do this
operation. By my benchmarks, the modulo way is 25% slower than the
bit-and way -- almost half an order of magnitude.
(Btw, my benchmark indicated about 2.5 microseconds per op -- rather
more than your "handful of nanoseconds". Of course, maybe that's
because I'm on a CoCo.)
John Porter
------------------------------
Date: 31 Mar 1998 09:40:38 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: Mike Hitchcock <mike@unival.com>
Subject: Re: Perl BNF/Perl parser
Message-Id: <8c3efyyfsp.fsf@gadget.cscaper.com>
>>>>> "Mike" == Mike Hitchcock <mike@unival.com> writes:
Mike> From perlfaq7:
Mike> Can I get a BNF/yacc/RE for the Perl language?
Mike> No, in the words of Chaim Frenkel: "Perl's grammar can not
Mike> be reduced to BNF. The work of parsing perl is distributed
Mike> between yacc, the lexer, smoke and mirrors."
Mike> Is this still true?
Yes, it's still true. There's a heavily incestuous relationship
between the Yacc grammar and the hand-rolled lexer. See perly.y
and toke.c for the interactions.
Mike> I can imagine that some parts of Perl
Mike> would be hard to fit into BNF, but if it is a small percentage,
Mike> maybe those could be treated as "unkown" or "ambiguous" tokens...
Nope. Not possible. To parse Perl, you have to have a deep
understanding of the multiple levels of overloading and "do what I
mean" analysis that goes on in these files. Larry is a crazy man.
Genius, but crazy. :-)
As I have said in a past post:
Perl is incredibly difficult to parse. For example,
what's the difference between these:
time /3 ;#/; print "hello";
sin /3 ;#/; print "goodbye";
Right. The first one is time divided by 3, and the print is in a
comment. The second one is the sin of the result of a regular
expression match for "3 ;#", and the print gets executed!
There's no pure BNF in the world that'll handle that. And remember,
with "use" and prototypes available, whether you parse something like
"sin" or "time" depends on its definition in some other file,
somewhere in the galaxy (or even decided by Perl code in a BEGIN
block, that evals a prototype!).
Which led Larry to say at one point: "the only thing that can parse
Perl is 'perl'".
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 153 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Tue, 31 Mar 1998 16:12:13 GMT
From: lien@cs.umb.edu (jlk)
Subject: perl for Oracle database interface
Message-Id: <xB8U.7$XC.303888@cam-news-reader1.bbnplanet.com>
I heard that there are perl libraries for Oracle database interface.
Does anyone know where I can get thoes libraries? p.s.It is not ora_perl.
thanks....
------------------------------
Date: Tue, 31 Mar 1998 15:25:47 GMT
From: nick@NOSPAMTHANKSciof.sbcc.net (Nick Tonkin)
Subject: Re: Registration fees for TCP 2.0.
Message-Id: <35210a9f.381551992@news.silcom.com>
On 30 Mar 1998 21:33:23 GMT, abigail@fnx.com (Abigail) wrote:
Jeez Abby, a completely off-topic post AND an unwrapped sig all in
one? I guess you just moved into a glass house, huh? Maybe we'll see a
little less stone-chucking from you now . . . ?
>
>Does anyone know what the approximate registration fees for TCP 2.0
>will be? The website says registration details will be available
>half May - which is 2 weeks after the deadline on papers.
>
>It would be nice if it's worthwhile to spend time writing a paper...
>
>
>
>Abigail
>--
>perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle 'print +(HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET", "http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content)) =~ /(.*\))[-\s]+Additional/s) [0]'
------------------------------
Date: Tue, 31 Mar 1998 10:42:20 -0500
From: John Porter <jdporter@min.net>
Subject: Re: Registration fees for TCP 2.0.
Message-Id: <35210EDC.136F@min.net>
Nick Tonkin wrote:
>
> Jeez Abby, a completely off-topic post AND an unwrapped sig all in
> one?
Not off-topic, if you realized that he meant TPC 2.0, The
(second annual) Perl Conference.
John Porter
------------------------------
Date: 31 Mar 1998 16:22:22 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Registration fees for TCP 2.0.
Message-Id: <6fr57u$2b4$2@client2.news.psi.net>
Nick Tonkin (nick@NOSPAMTHANKSciof.sbcc.net) wrote on MDCLXXIII September
MCMXCIII in <URL: news:35210a9f.381551992@news.silcom.com>:
++ On 30 Mar 1998 21:33:23 GMT, abigail@fnx.com (Abigail) wrote:
++
++
++ Jeez Abby, a completely off-topic post AND an unwrapped sig all in
++ one? I guess you just moved into a glass house, huh? Maybe we'll see a
++ little less stone-chucking from you now . . . ?
Well, I made a typo. TPC: The Perl Conference. I don't see why that
is completely off-topic here?
As for the unwrapped sig, it's less than 4 x 80 bytes. Would I put
newlines in it, it wouldn't fit in 4 lines. Unless I remove spaces.
But that's horrid.
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'
------------------------------
Date: Tue, 31 Mar 1998 15:17:00 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Script Headers
Message-Id: <EqovsD.F4D@world.std.com>
Anthony Shawn Johnson <diop3@cae.uwm.edu> writes:
>Hello, I trying to help a friend set-up his
>secure server for his website business.
Consider recomending to your friend that he or she hire a
professional.
>When we
>attempt to link to the cgi script linked written
>in Perl we're informed that there is a internal server
>error, which it given has a "premature end of script headers".
Perl, has no such error message, so it must be coming from your HTTP
server. What does the documentation that comes with the server say
about this error message?
>Does anyone know what script headers there talking about.
Very likely the headers specified in the CGI protocol.
<URL:http://cgi-resources.com/Documentation/CGI_Specification/>
Now if you take a look at the CGI spec, take a look at the output of
your program, take a look at the error log of your server, and still
have questions, you might want to take a look at the newsgroup dealing
with HTTP servers for your operating system.
<URL:news:comp.infosystems.www.servers.mac>
<URL:news:comp.infosystems.www.servers.misc>
<URL:news:comp.infosystems.www.servers.ms-windows>
<URL:news:comp.infosystems.www.servers.unix>
--
Andrew Langmead
------------------------------
Date: Tue, 31 Mar 1998 10:22:55 -0500
From: "I have a life, and I can prove it!" <jefpin@bergen.org>
To: Andre Vieth <Andre.Vieth@schwerin.netsurf.de>
Subject: Re: small letters into capital letter
Message-Id: <Pine.SGI.3.95.980331102143.11155A-100000@vangogh.bergen.org>
>I4d like to transform small letters (saved in a variable) into capital
>letters.
You should look at the perlre man pages...
aw hell:
$word =~ tr/a-z/A-Z/;
is what you want.
--
Toupee, or not toupee? *THAT* is a hairpiece.
- Jeff Pinyan
Jeff Pinyan | users.bergen.org/%7Ejefpin | techmaster@bergen.org
ICQ# 10222129 | 10222129@pager.mirabilis.com | qw[jeff] on EFnet
&jp('"($``','','$)EDF8```','$*52J4```','$+E1G4```','#J``@','#2__`');sub
jp{for$w(@_){$_=unpack('B48',unpack('u',$w));$c=~tr/10/# /;print;}}
------------------------------
Date: Tue, 31 Mar 1998 10:20:28 -0500
From: John Porter <jdporter@min.net>
Subject: Re: Suppressing "used only once"
Message-Id: <352109BC.21FF@min.net>
Bart Lateur wrote:
>
> Just a guess: because oldstuff.pl is used by several scripts, and some
> of them DO use these "unused" variables?
I have a similar situation, but opposite :-)
In a .pm file, I have a bunch of "constants" being added to
the main namespace, like so:
*MAXLEN = \256;
and so on.
Perl does not see this as a use of $MAXLEN, so in my program,
if I use $MAXLEN only once -- I get that warning.
hmmm
John Porter
------------------------------
Date: Tue, 31 Mar 98 14:57:03 GMT
From: peb@transcontech.co.uk ("Paul E. Bennett")
Subject: Re: The "Y2k-bugs-are-not-just-a-legacy-problem" FAQ
Message-Id: <891356223snz@transcontech.co.uk>
In article <351FC6F1.F91DCD@geocities.com>
theranc@geocities.com "Theran Cochran" writes:
> yoboseyo wrote:
> > that's a fact jack!) So, how many years in 28 bits worth of seconds?
> > (4 bits for 16ths of a second...)
>
> Lets see
>
> 60 seconds in a minute
> 60 minutes in an hour
> 24 hours in a day
> * 365 days in a year
> --------
> 31536000 seconds in a year (well, approximately.
> Didn't account for leap years, leap seconds, or
> relativistic distortion)
>
> 2^28 = 268435456 different possible values in a 28 bit field
>
> 268435456
> --------- = 8.512 years in 28 bits worth of seconds
> 3513600
>
> So the answer to
> your question is: Not many.
>
> There are 136.192 years in a 32 bit field though (hence the year 2036
> bug in most Unix programs, or is that year 2106? I can't remember), and
> 584,942,417,355.1 years in a 64 bit field. Or about 100,000 times as
> long as multicellular life has existed on earth, plus a month to
> recompile all your programs to 128 bit date fields.
All the above leads to some quite complex calculation within small systems.
Register bits are not so expensive these days and I have been using 32 bits
for day numbers (from a reference date) for some years now. It gives me a
problem about 6 million years from now so time to think of the strategy
to be used then (probably port the data and change the reference).
This scheme means that the time is a natural binary number rolling over
once per day.
--
Paul E. Bennett ................... <peb@transcontech.co.uk>
Transport Control Technology Ltd. <http://www.tcontec.demon.co.uk/>
+44 (0)117-9499861 <enquiry@transcontech.co.uk>
Going Forth Safely
------------------------------
Date: Tue, 31 Mar 1998 11:06:51 -0600
From: Mark McDowell <m.mcdowell@bigfoot.com>
Subject: Re: The "Y2k-bugs-are-not-just-a-legacy-problem" FAQ
Message-Id: <352122AB.1344F72B@bigfoot.com>
Where DO you guys get this info!!! <big grin>
Daniel P. B. Smith wrote:
> In article <6foj26$b7p$1@marina.cinenet.net>,
> Craig Berry <cberry@cinenet.net> wrote:
>
> >One of the more useful factoids I've encountered is "pi seconds is a
> >nanocentury." It's easy to remember, accurate to well within 1%, and
> >makes long-interval time calculations in seconds easier to do in your
> >head.
>
> It was recently pointed out to me that "one furlong per fortnight"
> is almost exactly 1 centimeter per minute. How's that for useful?
>
> And, of course, "in fourteen hundred and ninety two/Columbus sailed
> the ocean blue/Divide the son-of-a-bitch by two/And that's how many
> watts are in a horsepower."
>
> --
> Daniel P. B. Smith
> dpbsmith@world.std.com
------------------------------
Date: 31 Mar 1998 10:51:10 -0500
From: kcohen@julius.ling.ohio-state.edu (Kevin B Cohen)
Subject: Re: ts: why have "push" and "unshift"?
Message-Id: <6fr3df$8st@julius.ling.ohio-state.edu>
In article <6fe9um$g30$1@orthanc.reference.com>, <tsatan@hotmail.com> wrote:
>Why does perl have the "push" and "unshift" functions?
hi,
most of the answers posted in response to this question had to do with
efficiency, and seemed to assume that given a particular list, you
will only ever want to add to one end or the other. however, dealing
with linguistic data---and that's the best use in the world for the
existence of perl, from my selfish point of view---it can be really
useful to be able to deal with the two ends of a list independently of
each other. so, the shift/unshift/pop/push 4-tuple is an especially
nice feature of perl, from my point of view.
kevin
------------------------------
Date: 31 Mar 98 16:45:56 GMT
From: "James Richardson" <jamesr@aethos.co.uk.nospam>
Subject: Re: works form cmd line only
Message-Id: <01bd5cc5$bb3ea700$26c0a4c1@kitkat.aethos.co.uk>
Mike Collins <mike@w3z.com> wrote in article
<3521fd88.7725928@news.tiac.net>...
> This was cross posted to comp.infosystems.www.authoring.cgi
> Looking for some help. It looks like perl to me.
>
[blah...snip]
[This is the same post I posted on 09/03/98 answering the same question]
Hmmm... quite often this sort of thing can happen because people forget
that the environment you get when you run stuff from the command line is
not necessarily the same as when you run as a cgi program. ((Nor should it
be either, I reckon))
What you could do is just print out your environment when you run the
program (cgi stylee), and check that your PATH, and any oracle specific
stuff is all set correctly.
Just to make this relevant to c.l.p.m I'll write some code to do this:
foreach $var (sort(keys(%ENV))) {
print "$var\t$ENV{$var}\n";
}
You really should check for errors, when you 'shell out' (try $!), and in
many cases its simply not necessary.....
James
------------------------------
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 2216
**************************************