[9610] in Perl-Users-Digest
Perl-Users Digest, Issue: 3204 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 20 12:07:25 1998
Date: Mon, 20 Jul 98 09:00:26 -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 Mon, 20 Jul 1998 Volume: 8 Number: 3204
Today's topics:
Re: A simple question about sub routines <tchrist@mox.perl.com>
help: $! with forks/pipes (did search and FAQ) zwd@my-dejanews.com
Re: How do I clear an array? <jdporter@min.net>
Re: How to connect to a socket ? <jimbo@soundimages.co.uk>
Re: How to define a structure in PERL? <tchrist@mox.perl.com>
Re: I'm baffled.. (and an amateur:) <jdporter@min.net>
Re: I'm baffled.. (and an amateur:) (Larry Rosler)
Re: multiple forks??? (Greg Bacon)
New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
Re: Perl Beautifier Home Page <rra@stanford.edu>
Re: Perl Beautifier Home Page <zenin@bawdycaste.org>
Re: Perl Beautifier Home Page <zenin@bawdycaste.org>
Re: Perl Beautifier Home Page (Larry Rosler)
Re: Perl CGI's under Windows NT <shaung@onlinetech.net>
perl4/perl5 differences (Michael Stevens)
Re: prototypes and 'Bizarre copy of ARRAY' (M.J.T. Guy)
Re: prototypes and 'Bizarre copy of ARRAY' <quednauf@nortel.co.uk>
Re: return values for $^O (Andrew M. Langmead)
Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
subscript on numeric <delta@netpage.tm.fr>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 20 Jul 1998 15:30:22 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: A simple question about sub routines
Message-Id: <6ovnqe$7l2$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, Chris Wareham <chris.wareham@blackwell.co.uk> writes:
:The fact that Perl is a `scripting' langauge
A what? What's a scripting language? Is that not a
programming language? What's scripting? What's programming?
uucp has a scripting language. The rest is just marketing like.
--tom
--
PS/2 -- Half a computer
OS/2 -- Half an operating system
PS/2: Yesterday's hardware today. OS/2: Yesterday's software tomorrow
------------------------------
Date: Mon, 20 Jul 1998 15:41:01 GMT
From: zwd@my-dejanews.com
Subject: help: $! with forks/pipes (did search and FAQ)
Message-Id: <6ovoee$r3j$1@nnrp1.dejanews.com>
I'm trying to understand how to do very robust forking.
How do I get something nice into $! ?
I know I can do a test with -x, and display a nice error, but what about other
errors?
Are there any mistakes/improvments to below?
email reply please.
Thanks,
-Zach
$pid = open(KID, "@ARGV|");
while(<KID>){
print "open->", $_;
}
close KID;
print "close->@ARGV returned ", $? >> 8, "\n";
@back = `@ARGV`;
for($i = 0; $i <= $#back; $i++){
print "backtick->", $back[$i];
}
print "@ARGV returned ", $? >> 8, "\n";
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Mon, 20 Jul 1998 15:17:29 GMT
From: John Porter <jdporter@min.net>
Subject: Re: How do I clear an array?
Message-Id: <35B3610B.4BB0@min.net>
[Someone who's too cool to use his real name (or any name)] wrote:
>
> The resulting internal representations (which I will admit,
> I have no real knowledge of) should be the same for each method of
> undefining an array.
"Should be"? By your own admission, you're not qualified to say.
> undef(VAR) undefines the value of VAR. It doesn't undefine the
> declared variable, but simply the value of said variable.
No; you don't "undefine a value", undef *is* a value. You're
replacing the current value (of a scalar) with a new, special value.
That's called "undefining a variable".
> In either case, @array still exists, but represents an empty string.
Um, "array", not "string". Right?
> Also, consider that, if you need this feature, undef() is nice enough
> to return the value that you just undefined (at least, I think it
> does... this statement is somewhat ambiguous - "the undefined value is
> returned" - it could mean the value that signifies "undefined" is
> returned (0), or it could mean the value that was cleared is returned)
No -- undef() does not return the previous value of the variable;
Yes -- undef() returns the value that signifies "undefined";
No -- that value is not zero, nor any other value. It's special and
unique.
--
John Porter
------------------------------
Date: 20 Jul 1998 16:36:13 +0100
From: Jim Brewer <jimbo@soundimages.co.uk>
Subject: Re: How to connect to a socket ?
Message-Id: <uemvg5yc2.fsf@jimbosntserver.soundimages.co.uk>
Tom Christiansen <tchrist@mox.perl.com> writes:
> You didn't use the strict pragma.
> You didn't use the Socket module.
> You didn't use the -w flag.
>
> And I don't think you read the perlipc(1) manpage,
> which answers this question in exhaustive detail.
>
> --tom
Who cares, you now have clp.moderated. Why are you still here? You got
what you wanted. Why are you still here? There is no need. You are no
safe from newbies and morons and idiots. What is your problem? Are you
going to continue to your diatribes despite the delivered salvation
you so endlessly pinned for? Why, oh why?
Jim Brewer,
------------------------------
Date: 20 Jul 1998 15:37:56 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How to define a structure in PERL?
Message-Id: <6ovo8k$7l2$2@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
chrish@squonk.net (Chris Hamilton) writes:
:: How can I do this in PERL?
:Use Perl objects:
Blech, no. Just use hashes. Objects are ludricrous overkill.
--tom
--
"Just because you're screwed *up* doesn't mean you're screwed." --Larry Wall
------------------------------
Date: Mon, 20 Jul 1998 14:58:31 GMT
From: John Porter <jdporter@min.net>
Subject: Re: I'm baffled.. (and an amateur:)
Message-Id: <35B35C9A.275@min.net>
Yong Huang wrote:
>
> Other than debugging, you really want to insert a lot of
> if ($foo==$bar) {print "XXX";} else { print "YYY";}
> type of blocks in your code.
Yes, that is an issue. Only the simplest pages whould reasonably be
generatedby one big print, without any logic branches determining
content.
> Another advantage (I think, haven't tested) is that multiple print'ed lines
> guarantee the user sees the result coming in a little by little in a slow
> connection if $| is set to 1. But a big print or a here doc prints that at
> one shot.
No, that's not how it works. If the bottleneck is a slow connection,
then the time overhead of multiple calls to the print() function vs. one
call is negligible. From the perspective of the connection, all the
input comes at once, and it all gets backed up in the bottleneck.
Also, unless the perl program is its own http server, you're actually
writing to another process, and it has its own ideas about how to
buffer the data stream.
> if you need this type of print to pipe, I wonder if you can still use a
> here doc:
>
> select SQL;
> print <<END
> select * from mytab;
> desc mytab;
> END
Even better, you can do this:
print SQL <<END
select * from mytab;
desc mytab;
END
--
John Porter
------------------------------
Date: Mon, 20 Jul 1998 08:08:44 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: I'm baffled.. (and an amateur:)
Message-Id: <MPG.101cfd5990a09bc498976c@nntp.hpl.hp.com>
[This followup was posted to comp.lang.perl.misc and a copy was sent to
the cited author.]
In article <35B35AB4.90F@min.net> on Mon, 20 Jul 1998 14:50:25 GMT, John
Porter <jdporter@min.net> says...
> Larry Rosler wrote:
> >
> > print <<HERE;
> > The sum of \$x and \$x is ${\($x + $x)}.
> > The value of the list is {[qw(whatever creates the list)]}.
> > HERE
>
> Typo? Should be
> The value of the list is @{[qw(whatever creates the list)]}.
> ??? ^
Typo for sure. Hard to justify that baroque bracketing without the @ :-)
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 20 Jul 1998 15:08:35 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
Subject: Re: multiple forks???
Message-Id: <6ovmhj$lq4$6@info.uah.edu>
In article <35B18830.4CBF@habit.com>,
Austin Schutz <spamsux-tex@habit.com> writes:
: While this is not an impossible task doing fork() it would
: probably be _much_ faster to grab the beta of perl 5.005 and read up
: on the new thread stuff.
Huh?!? Yes, perhaps it would be faster if your platform happens to be
forkly challenged and you have to implement fork yourself. Many, many
tuits have been spent to make fork run as quickly as possible.
In fact, with 5.005's threads, perl runs slower! I seriously doubt that
your claim has any weight whatsoever. Please provide data.
: I haven't looked at it yet, but in general it takes a fair amount of
: time/resources each time you fork(). Threads are more efficient in this
: respect and should be more applicable to your situation.
Data? It also takes a good amount of time to shake out the really
tricky bugs that accompany sharing memory by default and threads' other
programming pitfalls.
: Also (at least this has been my experience) you don't gain much,
: if anything, by parallelizing your activity unless you have multiple
: processors. YMMV.
Certain algorithms are more easily or naturally expressed as N processes
working in parallel. Decent systems can handle it.
Greg
--
open(G,"|gzip -dc");$_=<<EOF;s/[0-9a-f]+/print G pack("h*",$&)/eg
f1b88000b620f22320303fa2d2e21584ccbcf29c84d2258084
d2ac158c84c4ece4d22d1000118a8d5491000000
EOF
------------------------------
Date: 20 Jul 1998 15:15:14 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <6ovmu2$lq4$8@info.uah.edu>
Following is a summary of articles from new posters spanning a 7 day
period, beginning at 13 Jul 1998 14:38:18 GMT and ending at
20 Jul 1998 06:31:53 GMT.
Notes
=====
- A line in the body of a post is considered to be original if it
does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
- All text after the last cut line (/^-- $/) in the body is
considered to be the author's signature.
- The scanner prefers the Reply-To: header over the From: header
in determining the "real" e-mail address and name.
- Original Content Rating (OCR) is the ratio of the original content
volume to the total body volume.
- Find the News-Scan distribution on the CPAN!
<URL:http://www.perl.com/CPAN/modules/by-module/News/>
- Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
- Copyright (c) 1998 Greg Bacon. All Rights Reserved.
Verbatim copying and redistribution is permitted without royalty;
alteration is not permitted. Redistribution and/or use for any
commercial purpose is prohibited.
Totals
======
Posters: 261 (47.7% of all posters)
Articles: 380 (24.1% of all articles)
Volume generated: 585.6 kb (22.9% of total volume)
- headers: 260.0 kb (5,223 lines)
- bodies: 315.4 kb (9,917 lines)
- original: 238.7 kb (7,837 lines)
- signatures: 9.8 kb (227 lines)
Original Content Rating: 0.757
Averages
========
Posts per poster: 1.5
median: 1 post
mode: 1 post - 193 posters
s: 1.2 posts
Message size: 1578.0 bytes
- header: 700.6 bytes (13.7 lines)
- body: 850.0 bytes (26.1 lines)
- original: 643.2 bytes (20.6 lines)
- signature: 26.4 bytes (0.6 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
11 12.9 ( 7.7/ 4.8/ 2.8) Andy Bold <bytealite@yahoo.com>
7 8.8 ( 3.6/ 5.2/ 4.1) carltjm@mail.auburn.edu (Joseph M Carlton)
6 5.9 ( 4.1/ 1.8/ 1.5) "joe" <joe@rhein.to>
5 5.4 ( 2.9/ 2.6/ 1.4) "Mark Stang" <markstang@ncgroup.com>
5 9.8 ( 3.7/ 6.1/ 2.3) "tdean" <tdeanatgtedotnet>
5 8.2 ( 3.3/ 4.9/ 2.7) tim221175@my-dejanews.com
5 11.6 ( 3.1/ 8.5/ 8.3) Paul <swoboda@uvic.ca>
4 7.5 ( 2.8/ 4.7/ 3.6) David Hemmer <mastered@paclink.com>
4 5.9 ( 3.6/ 2.4/ 1.9) desar@club-internet.fr
4 5.4 ( 2.6/ 2.5/ 1.3) Dave Duchscher <daved@orion.tamu.edu>
These posters accounted for 3.5% of all articles.
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
12.9 ( 7.7/ 4.8/ 2.8) 11 Andy Bold <bytealite@yahoo.com>
11.6 ( 3.1/ 8.5/ 8.3) 5 Paul <swoboda@uvic.ca>
9.8 ( 3.7/ 6.1/ 2.3) 5 "tdean" <tdeanatgtedotnet>
9.4 ( 3.4/ 5.9/ 4.3) 4 "Clinton Gormley" <*clinton@consol.co.uk>
8.8 ( 3.6/ 5.2/ 4.1) 7 carltjm@mail.auburn.edu (Joseph M Carlton)
8.2 ( 3.3/ 4.9/ 2.7) 5 tim221175@my-dejanews.com
8.1 ( 2.2/ 5.9/ 5.3) 4 greg@bic.mni.mcgill.ca (Greg Ward)
8.0 ( 2.7/ 5.3/ 0.4) 2 dcrombie@chirp.com.au
8.0 ( 1.5/ 6.5/ 6.2) 2 Gordon Blair <devnull@interlog.com>
7.5 ( 2.8/ 4.7/ 3.6) 4 David Hemmer <mastered@paclink.com>
These posters accounted for 3.6% of the total volume.
Top 10 Posters by OCR (minimum of three posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
1.000 ( 0.8 / 0.8) 4 "David Reynolds" <irisbeau@wolsi.com>
1.000 ( 2.4 / 2.4) 4 "Gil Brown" <gil_brown@hp.com>
0.974 ( 8.3 / 8.5) 5 Paul <swoboda@uvic.ca>
0.902 ( 5.3 / 5.9) 4 greg@bic.mni.mcgill.ca (Greg Ward)
0.837 ( 1.5 / 1.8) 3 "Ekenberg" <joreb@algonet.se>
0.819 ( 1.5 / 1.8) 6 "joe" <joe@rhein.to>
0.803 ( 1.9 / 2.4) 4 desar@club-internet.fr
0.799 ( 4.1 / 5.2) 7 carltjm@mail.auburn.edu (Joseph M Carlton)
0.767 ( 3.6 / 4.7) 4 David Hemmer <mastered@paclink.com>
0.718 ( 4.3 / 5.9) 4 "Clinton Gormley" <*clinton@consol.co.uk>
Bottom 10 Posters by OCR (minimum of three posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.669 ( 2.9 / 4.3) 3 cabneySP4M@SP4M.SP4Mcyberpass.net (C. Abney)
0.622 ( 1.7 / 2.7) 3 webmaster@acidhouse.com
0.597 ( 2.8 / 4.8) 11 Andy Bold <bytealite@yahoo.com>
0.593 ( 2.6 / 4.3) 3 josh@netoutfit.com
0.537 ( 2.7 / 4.9) 5 tim221175@my-dejanews.com
0.533 ( 1.4 / 2.6) 5 "Mark Stang" <markstang@ncgroup.com>
0.497 ( 1.3 / 2.5) 4 Dave Duchscher <daved@orion.tamu.edu>
0.471 ( 1.2 / 2.7) 3 Simon Matthew Wistow <simon@new-mediacom.com>
0.389 ( 0.7 / 1.9) 4 Stephan Lagerholm <stephan@spartacus.unilog.se>
0.379 ( 2.3 / 6.1) 5 "tdean" <tdeanatgtedotnet>
20 posters (7%) had at least three posts.
Top 10 Crossposters
===================
Articles Address
-------- -------
25 Harald <"HGem|nden"@aol.com>
25 Jesse Weigert <jweigert@nospam.usa.net>
9 Sascha Matzke <sascha@bespin.escape.de>
9 "Marco Richter" <marco.richter@luebeck.netsurf.de>
9 student@compu-shack.com (Mark Breidenbach)
9 hwr@pilhuhn.de
9 sede <nikspitzer@usa.net>
8 "dogmat" <macdonaldrj@bv.com>
8 "Philipp Steinau" <Philipp.Steinau@gmx.de>
8 dcrombie@chirp.com.au
------------------------------
Date: 20 Jul 1998 08:05:50 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Perl Beautifier Home Page
Message-Id: <m3d8b0pnox.fsf@windlord.Stanford.EDU>
Snowhare <snowhare@devilbunnies.org> writes:
> Oh?
[snipped code to generate a list of dates]
> That is five levels including the surrounding method I yanked it from.
> Six if you count the 'if's in the innermost loop. And yes - I *meant*
> to use 'gt' and 'lt' in this context rather than '>' and '<' in the
> innermost loop.
Yeah, I see that. Interesting code, although I hope you didn't use it
across the year 1900 since the algorithm for detecting leap years is
flawed. Without knowledge more of the surrounding structure to see if the
globals that you have there really need to be globals I can't be sure this
would be easy, but I'd personally usually write a sub that generated the
list of dates, thus pulling that section out of the while loop, which
would coincidentally reduce the number of levels to four. (I wouldn't
count the internal if statements, no.)
I honestly find the for loops and the adding of zeroes and then doing
string comparisons slightly inelegant and would probably find a different
algorithm for doing the same thing, but that's just personal taste.
>> I've encountered *very, very* few exceptions to that principle that can
>> be justified. If you use a four-space indent, you should be able to
>> handle four level nesting without continuation with very little
>> difficulty.
> Maybe. If you don't have any substantial logic conditions or
> long variable/method names.
Substantial logic sections can be continued on multiple lines. The only
line you had over 80 colums was:
next if (($date_string lt $starting_date) || ($date_string gt $ending_date));
which I would have written as:
next if $date_string lt $starting_date;
next if $date_string gt $ending_date;
anyway just because I find that easier to read than the maze of parens and
having both conditions on the same line. I'm fairly sure the speed
difference is negligible, although one could benchmark.
And I'm not a big fan of long variable names; variable names rarely have
to be that long to make sense.
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: 20 Jul 1998 15:21:34 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Perl Beautifier Home Page
Message-Id: <900948680.871430@thrush.omix.com>
Uri Guttman <uri@sysarch.com> wrote:
>snip<
: maybe you need to create an overloaded object to handle incrementing and
: managing multipart version numbers.
It's been done. I call mine RCS. :-)
: it could do the comparisons and
: other numeric related ops including magic autoincrement which can recognize
: this form.
I've tried overriding UNIVERSAL::VERSION, but to make it work
correctly requires that modules be used with quoted version
numbers as:
use My::Module '1.2.3';
As opposed to the much more common:
use My::Module 1.2.3;
To get the same effect as the quoted case would require hacks
to toke.c.
: but how do you designate when to carry over to the next
: higher sub-version?
That's the easy part. If the major is the same, check the
minor. If the minor is the same, check the next minor. And
on, and on until you find who is bigger if either.
The hard part is not getting your minors cut off or badly
concatenated into mush.
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: 20 Jul 1998 15:31:57 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Perl Beautifier Home Page
Message-Id: <900949303.941097@thrush.omix.com>
John Porter <jdporter@min.net> wrote:
: It may (arguably) be that 80 columns is too narrow for usefulness.
:
: But you can't just let lines go to unlimited length, especially in a
: multi-programmer environment (i.e. the real world). Source code files
: need to be width-constrained, and it needs to be some reasonably small
: number, even if >80. I don't like horizontal scrolling, and I sure
: hate scrolling 10+ times the width of the viewport.
Quite true. Normally I limit my code to <95 unless I've got a good
reason to need to pull it out farther. In such a case, we're only
talking about this ' ' much space, which is a
trivial amount (IMO anyway), but is often just enough "breathing
room" to make code much, much cleaner.
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: Mon, 20 Jul 1998 08:49:02 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Perl Beautifier Home Page
Message-Id: <MPG.101d06c42bbd112698976d@nntp.hpl.hp.com>
In article <m3d8b0pnox.fsf@windlord.Stanford.EDU> on 20 Jul 1998 08:05:50
-0700, Russ Allbery <rra@stanford.edu> says...
...
> Yeah, I see that. Interesting code, although I hope you didn't use it
> across the year 1900 since the algorithm for detecting leap years is
> flawed.
Or 2100, for that matter. We should be thankful to live in the middle of
a 200- year period of leap-year regularity without needing the $year %
400 test. *My* code won't last long enough until it matters (he said,
blithely ignoring the current 'century bug').
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 20 Jul 1998 11:20:45 -0400
From: Shaun Gilroy <shaung@onlinetech.net>
Subject: Re: Perl CGI's under Windows NT
Message-Id: <35B3604D.B4BCA32@onlinetech.net>
I'd be interested in finding out how to work this too. I do IIS4 and I
always resort to ASP in such a circumstance because I run into this same
problem.
But here's your confirmation. I get exactly the same error with IIS4 on
NTServer and I suspect it may be an issue of needing some sort of ocx on
the server.
--
_______________________________________________________________________
Shaun E. Gilroy shaung@onlinetech.net
Online Technologies Corporation Phone: 734.761.8742 x-233
http://www.onlinetechnologies.net/
------------------------------
Date: 20 Jul 1998 15:06:29 GMT
From: michael@rmta.org (Michael Stevens)
Subject: perl4/perl5 differences
Message-Id: <slrn6r6n7h.4eb.michael@lily.csv.warwick.ac.uk>
Hi.
I have a 30k+ perl script written for perl4 or earlier, that I need to
maintain and run. My current problem is that under the perl4 available to
me it produces one set of output, under perl5 it produces a second set of
output, and neither set is the same as the output produced by the program on
the system for which it was written.
I've read the FAQ, but can't find any documentation on things that would
work under perl4 but differently under perl5.
I ideally need to use this script. It's remotely possibly that I could
rewrite it - it would be a major investment of time, and learning about the
subject area in which the script works.
I'm obviously not posting a 30k script, and it's a bit of a daunting
task to identify where the behaviour of perl4 and perl5 diverge.
--
"The world is complex. Sendmail.cf reflects this...."
-- Robbie Honerkamp
--
"The world is complex. Sendmail.cf reflects this...."
-- Robbie Honerkamp
------------------------------
Date: 20 Jul 1998 15:29:27 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: prototypes and 'Bizarre copy of ARRAY'
Message-Id: <6ovnon$ro3$1@pegasus.csx.cam.ac.uk>
In article <35AFDBB8.4F7D17B4@hol.fr>, Douglas Seay <seay@hol.fr> wrote:
>I get a 'Bizarre copy of ARRAY in aassign at ./t line 9 (#2)' error
This bug is mended in both the development and maintenance branches of Perl,
so will be fixed in Perl 5.004_05 and in Perl 5.005.
Simplest workround in the meantime (if you don't want to play with beta
versions) is probably to ditch the prototypes.
Mike Guy
------------------------------
Date: Mon, 20 Jul 1998 16:45:15 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: prototypes and 'Bizarre copy of ARRAY'
Message-Id: <35B3660B.E11E6569@nortel.co.uk>
M.J.T. Guy wrote:
> >I get a 'Bizarre copy of ARRAY in aassign at ./t line 9 (#2)' error
>
> This bug is mended in both the development and maintenance branches of Perl,
> so will be fixed in Perl 5.004_05 and in Perl 5.005.
One shouldn't get rid of such a classy error message, though :)
--
____________________________________________________________
Frank Quednau
http://www.surrey.ac.uk/~me51fq
________________________________________________
------------------------------
Date: Mon, 20 Jul 1998 15:08:49 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: return values for $^O
Message-Id: <EwEFEq.9D5@world.std.com>
"Brent Verner" <REPLY_TO_damonbrent@earthlink.net> writes:
>could anyone out there tell me, in particular, the $^O values for operating
>systems that use \r\n as record separators such as NT. i'm on linux, so
>that is the only $^O that i can see.
How about taking the problem from another angle? Have the makefile
that installs you module perform a small test. Write a newline to a
temp file in text mode, then read the file in binary mode and see if a
carriage return is present. Then do a search and replace in your
module code before installing.
Otherwise the OS test for the $NR variable in the CGI module may be
interesting to you.
--
Andrew Langmead
------------------------------
Date: 20 Jul 1998 15:14:36 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <6ovmss$lq4$7@info.uah.edu>
Following is a summary of articles spanning a 7 day period,
beginning at 13 Jul 1998 14:38:18 GMT and ending at
20 Jul 1998 06:31:53 GMT.
Notes
=====
- A line in the body of a post is considered to be original if it
does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
- All text after the last cut line (/^-- $/) in the body is
considered to be the author's signature.
- The scanner prefers the Reply-To: header over the From: header
in determining the "real" e-mail address and name.
- Original Content Rating (OCR) is the ratio of the original content
volume to the total body volume.
- Find the News-Scan distribution on the CPAN!
<URL:http://www.perl.com/CPAN/modules/by-module/News/>
- Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
- Copyright (c) 1998 Greg Bacon. All Rights Reserved.
Verbatim copying and redistribution is permitted without royalty;
alteration is not permitted. Redistribution and/or use for any
commercial purpose is prohibited.
Excluded Posters
================
perlfaq-suggestions\@mox\.perl\.com
Totals
======
Posters: 547
Articles: 1580 (638 with cutlined signatures)
Threads: 435
Volume generated: 2553.0 kb
- headers: 1098.2 kb (21,774 lines)
- bodies: 1337.3 kb (41,338 lines)
- original: 882.6 kb (29,261 lines)
- signatures: 115.9 kb (2,451 lines)
Original Content Rating: 0.660
Averages
========
Posts per poster: 2.9
median: 1 post
mode: 1 post - 342 posters
s: 6.5 posts
Posts per thread: 3.6
median: 2 posts
mode: 1 post - 133 threads
s: 5.4 posts
Message size: 1654.6 bytes
- header: 711.8 bytes (13.8 lines)
- body: 866.7 bytes (26.2 lines)
- original: 572.0 bytes (18.5 lines)
- signature: 75.1 bytes (1.6 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
81 142.2 ( 53.9/ 80.3/ 47.5) lr@hpl.hp.com (Larry Rosler)
50 81.0 ( 37.0/ 31.0/ 15.1) comdog@computerdog.com (brian d foy)
47 78.6 ( 31.6/ 46.9/ 31.9) cberry@cinenet.net (Craig Berry)
44 76.1 ( 27.8/ 48.2/ 29.6) linberg@literacy.upenn.edu (Steve Linberg)
43 73.8 ( 33.7/ 29.0/ 16.0) rjk@coos.dartmouth.edu (Ronald J Kimball)
36 71.6 ( 26.5/ 45.1/ 26.5) root.noharvest.\@not_even\here.com
32 50.1 ( 25.9/ 19.0/ 8.3) abigail@fnx.com
28 43.7 ( 23.0/ 17.0/ 13.2) tchrist@mox.perl.com (Tom Christiansen)
28 39.1 ( 21.6/ 15.1/ 8.5) jdporter@min.net
25 40.2 ( 16.4/ 18.9/ 13.0) mgjv@comdyn.com.au (Martien Verbruggen)
These posters accounted for 26.2% of all articles.
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
142.2 ( 53.9/ 80.3/ 47.5) 81 lr@hpl.hp.com (Larry Rosler)
81.0 ( 37.0/ 31.0/ 15.1) 50 comdog@computerdog.com (brian d foy)
78.6 ( 31.6/ 46.9/ 31.9) 47 cberry@cinenet.net (Craig Berry)
76.1 ( 27.8/ 48.2/ 29.6) 44 linberg@literacy.upenn.edu (Steve Linberg)
73.8 ( 33.7/ 29.0/ 16.0) 43 rjk@coos.dartmouth.edu (Ronald J Kimball)
71.6 ( 26.5/ 45.1/ 26.5) 36 root.noharvest.\@not_even\here.com
50.1 ( 25.9/ 19.0/ 8.3) 32 abigail@fnx.com
44.8 ( 15.1/ 23.1/ 18.0) 19 Zenin <zenin@bawdycaste.org>
43.7 ( 23.0/ 17.0/ 13.2) 28 tchrist@mox.perl.com (Tom Christiansen)
40.2 ( 16.4/ 18.9/ 13.0) 25 mgjv@comdyn.com.au (Martien Verbruggen)
These posters accounted for 27.5% of the total volume.
Top 10 Posters by OCR (minimum of five posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
1.000 ( 8.5 / 8.5) 7 Dan Schmidt <dfan@harmonixmusic.com>
1.000 ( 4.9 / 4.9) 8 gabor@vmunix.com (Gabor)
0.978 ( 3.9 / 4.0) 5 "Clinton Gormley" <clint@netcomuk.co.ukXX>
0.974 ( 8.3 / 8.5) 5 Paul <swoboda@uvic.ca>
0.959 ( 6.3 / 6.6) 11 fl_aggie@thepentagon.com (I R A Aggie)
0.901 ( 8.2 / 9.1) 13 gebis@albrecht.ecn.purdue.edu (Michael J Gebis)
0.822 ( 2.1 / 2.5) 8 "Darren Sweeney" <darrensw@pacbell.net>
0.819 ( 1.5 / 1.8) 6 "joe" <joe@rhein.to>
0.799 ( 4.1 / 5.2) 7 carltjm@mail.auburn.edu (Joseph M Carlton)
0.780 ( 18.0 / 23.1) 19 Zenin <zenin@bawdycaste.org>
Bottom 10 Posters by OCR (minimum of five posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.467 ( 4.7 / 10.1) 12 ilya@math.ohio-state.edu (Ilya Zakharevich)
0.439 ( 2.2 / 5.0) 7 "David Thompson" <domainsource@usa.net>
0.437 ( 2.2 / 5.1) 7 dblack@saturn.superlink.net (David A. Black)
0.435 ( 8.3 / 19.0) 32 abigail@fnx.com
0.428 ( 1.4 / 3.3) 5 kortbein@iastate.edu (Josh Kortbein)
0.401 ( 4.2 / 10.5) 13 "Matthew O. Persico" <mpersico@erols.com>
0.386 ( 2.8 / 7.2) 9 maierc@chesco.com
0.379 ( 2.3 / 6.1) 5 "tdean" <tdeanatgtedotnet>
0.350 ( 2.1 / 6.0) 7 kpreid@ibm.net (Kevin Reid)
0.277 ( 4.9 / 17.8) 10 Tim Maher <tim.maher@halcyon.com>
59 posters (10%) had at least five posts.
Top 10 Threads by Number of Posts
=================================
Posts Subject
----- -------
76 Perl Beautifier Home Page
21 RegExps: Check if string consists of EXACTLY 3 digits ??
20 Recommend me Perl!
20 newbie date format
19 Restricting refering domains access to script?
18 Sticking in NULL after split
18 How do I clear an array?
18 efficiency: print<<"xxx" vs. print
17 Help me on the if-then-else branch
15 Recipient Validation
These threads accounted for 15.3% of all articles.
Top 10 Threads by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Subject
-------------------------- ----- -------
149.2 ( 59.7/ 79.4/ 45.0) 76 Perl Beautifier Home Page
36.5 ( 13.1/ 21.6/ 13.1) 18 efficiency: print<<"xxx" vs. print
35.7 ( 15.8/ 18.3/ 10.0) 21 RegExps: Check if string consists of EXACTLY 3 digits ??
34.1 ( 14.9/ 17.0/ 10.9) 20 newbie date format
32.0 ( 13.9/ 16.7/ 9.8) 18 How do I clear an array?
31.2 ( 15.5/ 13.9/ 6.0) 19 Restricting refering domains access to script?
28.5 ( 14.2/ 12.5/ 9.0) 20 Recommend me Perl!
27.7 ( 12.8/ 14.7/ 5.5) 13 HELP: Internet Database Design questions...
27.5 ( 12.1/ 13.8/ 7.6) 18 Sticking in NULL after split
27.2 ( 7.0/ 19.0/ 11.3) 9 Reading in an email message into a Perl program
These threads accounted for 16.8% of the total volume.
Top 10 Threads by OCR (minimum of five posts)
==============================================
(kb) (kb)
OCR orig / body Posts Subject
----- -------------- ----- -------
0.975 ( 3.4/ 3.5) 5 Locking SDBM files
0.939 ( 7.6/ 8.1) 7 Print LoL-tree routine (attached)
0.855 ( 2.0/ 2.4) 5 Win NT Perl 5.0 Y2K compliance
0.834 ( 3.1/ 3.7) 7 portability of -s
0.777 ( 6.0/ 7.7) 5 Premature End of Script Header problem
0.751 ( 6.2/ 8.2) 8 How can I use a $ in s///?
0.742 ( 8.4/ 11.4) 12 Please Help Me! (Matt's Script BB Problem)
0.739 ( 2.1/ 2.8) 5 cgi module confusion
0.738 ( 2.6/ 3.6) 6 WebBots
0.736 ( 2.8/ 3.8) 8 Deutsche Boerse sucht 100 neue Mitarbeiter im IT-Bereich
Bottom 10 Threads by OCR (minimum of five posts)
=================================================
(kb) (kb)
OCR orig / body Posts Subject
----- -------------- ----- -------
0.435 ( 2.2 / 5.1) 9 clp.moderated
0.429 ( 6.0 / 13.9) 19 Restricting refering domains access to script?
0.427 ( 1.9 / 4.5) 6 Midnight Oil reference in Perl book?
0.417 ( 2.2 / 5.3) 5 $my_debugger{contains_bugs} = 1;
0.401 ( 1.8 / 4.6) 7 Why is Dave operating here? (was Re: REPOST: Re: )
0.385 ( 2.6 / 6.7) 8 Arrays
0.379 ( 1.8 / 4.7) 7 First meeting of Dallas.pm
0.375 ( 5.5 / 14.7) 13 HELP: Internet Database Design questions...
0.370 ( 3.3 / 8.9) 5 OFFTOPIC: Re: HELP: Internet Database Design questions...
0.323 ( 3.5 / 10.9) 9 Perl Setup on NT
96 threads (22%) had at least five posts.
Top 10 Targets for Crossposts
=============================
Articles Newsgroup
-------- ---------
37 comp.lang.perl.modules
19 comp.lang.javascript
18 comp.databases.ms-sqlserver
17 alt.html
17 comp.programming
15 comp.unix.shell
14 comp.databases.theory
12 comp.unix.questions
12 comp.unix.misc
10 de.comp.lang.perl
Top 10 Crossposters
===================
Articles Address
-------- -------
25 Jesse Weigert <jweigert@nospam.usa.net>
25 Harald <"HGem|nden"@aol.com>
21 root.noharvest.\@not_even\here.com
11 linberg@literacy.upenn.edu (Steve Linberg)
9 sede <nikspitzer@usa.net>
9 Sascha Matzke <sascha@bespin.escape.de>
9 klassa@aur.alcatel.com
9 hwr@pilhuhn.de
9 student@compu-shack.com (Mark Breidenbach)
9 "Marco Richter" <marco.richter@luebeck.netsurf.de>
------------------------------
Date: Mon, 20 Jul 1998 17:34:21 +0200
From: "delta" <delta@netpage.tm.fr>
Subject: subscript on numeric
Message-Id: <6ovnuc$3a9$1@front3.grolier.fr>
Hello,
There is a part a my script
**********************************************
FIN
$fond1=shift @info;
print "\t<option value=\""#ffffff"\"";
if ($fond1 == "#ffffff" ) { print "selected" };
print ">Blanc</option>";
print "\t<option value=\""#000000"\"";
if ($fond1 == "#000000" ) { print "selected" };
print ">Noir</option>";
$couleur1=shift @info;
print << "FIN";
</select>
***************************************
It's seems to be ok but I get an error message :
Can't use subscript on numeric eq at identdepotan.cgi line 768, near
""selected"
}"
Any idea, .....I have no one
Thank's
------------------------------
Date: 12 Jul 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 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3204
**************************************