[12213] in Perl-Users-Digest
Perl-Users Digest, Issue: 5813 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 28 06:07:56 1999
Date: Fri, 28 May 99 03:00:16 -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 Fri, 28 May 1999 Volume: 8 Number: 5813
Today's topics:
Can Perl do this? <ralawrence@my-deja.com>
Re: Can Perl do this? <ebohlman@netcom.com>
Converting from ASCII to ANSI (and vice versa) (Poul Kornmod)
Re: Converting from ASCII to ANSI (and vice versa) <ebohlman@netcom.com>
Re: directory file list into html conversion <devans@radius-retail.kom>
Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Pe finsol@ts.co.nz
Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Pe <uri@sysarch.com>
Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Pe <ebohlman@netcom.com>
Getting Digits out of a String with m// <andre.pletschette@ltam.lu>
Hash problems? <Tobin@breathemail.net>
Help on Regular Xpression tvn007@my-deja.com
Re: Help on Regular Xpression <uri@sysarch.com>
How to call real RPCs w/ perl <michael.watzl@tesis.de>
Re: Perl "constructors" (Sam Holden)
Re: Perl "constructors" (Sam Holden)
perlcc and multiples modules <gulli@ideare.com>
Put my() inside or outside a loop? (Steve Shreeve)
Re: Y2K infected Perl code (David Cantrell)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 28 May 1999 08:27:56 GMT
From: Richard Lawrence <ralawrence@my-deja.com>
Subject: Can Perl do this?
Message-Id: <7ilk2a$5hl$1@nnrp1.deja.com>
I would really be impressed if I can write a bit of perl that goes to a
specific url, fills out some fields and then selects the submit button.
Is this possible?
(Note: I can't just go directly to the final url complete with
&var=value - because the web page refuses to accept the request)
Any help would be appreciated. I have the lwp library installed.
Regards
Rich
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 28 May 1999 09:48:52 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Can Perl do this?
Message-Id: <ebohlmanFCFsLG.34B@netcom.com>
Richard Lawrence <ralawrence@my-deja.com> wrote:
: I would really be impressed if I can write a bit of perl that goes to a
: specific url, fills out some fields and then selects the submit button.
: Is this possible?
: (Note: I can't just go directly to the final url complete with
: &var=value - because the web page refuses to accept the request)
: Any help would be appreciated. I have the lwp library installed.
What you say suggests that the page in question expects to receive a POST
rather than a GET. Take a look at lwpcook to see how to do this (you'll
have to use LWP::UserAgent rather than LWP::Simple).
------------------------------
Date: Fri, 28 May 1999 09:26:36 GMT
From: pbk@rdsas.com (Poul Kornmod)
Subject: Converting from ASCII to ANSI (and vice versa)
Message-Id: <374e5643.8496905@news.dknet.dk>
Dear All,
I have searched the FAQ for this problem - but didn't find any
solutions.
How to convert chars from ASCII to ANSI?
Thanks in advance
Poul Kornmod - pbk@cphzt.rdsas.com
------------------------------
Date: Fri, 28 May 1999 09:51:42 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Converting from ASCII to ANSI (and vice versa)
Message-Id: <ebohlmanFCFsq6.3C2@netcom.com>
Poul Kornmod <pbk@rdsas.com> wrote:
: I have searched the FAQ for this problem - but didn't find any
: solutions.
: How to convert chars from ASCII to ANSI?
What do you mean by "ANSI"? Do you mean MS-Windows CP-1250 (which does
not correspond to any ANSI standard; it's ISO-8859-1 plus a bunch of
mappings to characters in the 0-31 and 128-159 ranges)? ASCII is a
subset of CP-1250, so no conversion is necessary.
------------------------------
Date: Fri, 28 May 1999 09:23:36 +0100
From: "Dave Evans" <devans@radius-retail.kom>
Subject: Re: directory file list into html conversion
Message-Id: <374e5213.0@nntp.mmi.org>
This is a multi-part message in MIME format.
------=_NextPart_000_0042_01BEA8EB.C3A78830
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
[mailed+posted]
I've just knocked up this little script to do that kind of thing (on Win32
though so you'll need to tweak it a little).
Of course there is *no* security in this - that has to be built in later.
Hope it helps.
-----Original Message-----
From: junsc@sysic.hei.co.kr <junsc@sysic.hei.co.kr>
Newsgroups: comp.lang.perl.misc
Date: 28 May 1999 07:53
Subject: directory file list into html conversion
>Hi, All
>
>Our intranet web server administrator has forbidden plain directory
>browsing by the web browser.
>
>I have quite large directory hierarchy structure that are full of
>document and reference files and I want to avoid making index file in
>each directory manually. Is there any easy way to convert file structure
>in a directory into html index file?
>
>Utility or Workaround in server are welcomed.
>
>Thanks in advance.
>
>Sungchun
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
>
------=_NextPart_000_0042_01BEA8EB.C3A78830
Content-Type: application/x-perl;
name="dirbrowse.pl"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="dirbrowse.pl"
#!/usr/bin/perl -w
# vi:ts=4:sw=4
# Standard CGI perl script...
use CGI;
use CGI::Carp qw(fatalsToBrowser);
BEGIN { CGI::Carp::set_message("It's not a bug, it's a feature!"); }
$cgi = new CGI;
# Use the CGI parameter "path" to name the directory to list
# Default it to C:\
$dir = $cgi->param('path');
$dir = "C:\\" unless $dir;
# Print the page, calling the sub ListDirectory to turn the directory
# contents into HTML.
print $cgi->header,
$cgi->start_html(
'-title' => 'Directory browser',
),
$cgi->h1("Listing of $dir"),
$cgi->hr,
"<p>",
&ListDirectory($dir),
$cgi->end_html;
close STDOUT;
close STDERR;
exit;
# Turn the directory named by $_[0] into some html
sub ListDirectory {
my $dir = shift;
# Read the contents of the directory
opendir(DIR, $dir) or die "opendir $dir: $!";
# The grep removes the "." and ".." entries, if they are there.
my @dir = sort grep !/^\.\.?$/, readdir(DIR);
closedir DIR;
my $html = "";
# If we are not in a root directory, add an entry ".." to go up a level.
if ($dir =~ /\\./) {
my $up = $`;
$up .= "\\" if $up =~ /:$/;
my $p = CGI::escape($up);
$html .= "<p><a href='/cgi-bin/dirbrowse.pl?path=$p'>..</a>\n"
};
# Add an entry on the page for every item in the directory.
for (@dir) {
my $p = "$dir\\$_";
$p = CGI::escape($p);
my $line = $_;
# If this is a sub-directory, add a link to this CGI script again
# to list that sub-directory.
$line = "<a href='/cgi-bin/dirbrowse.pl?path=$p'>$line</a>"
if -d "$dir\\$_";
$html .= "<p>$line\n";
};
# Return the resulting HTML.
$html;
}
------=_NextPart_000_0042_01BEA8EB.C3A78830--
------------------------------
Date: Fri, 28 May 1999 08:15:28 GMT
From: finsol@ts.co.nz
Subject: Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Perl Y2K compliant?
Message-Id: <7iljav$554$1@nnrp1.deja.com>
In article <slrn7krnjc.2uj.fl_aggie@thepentagon.com>,
fl_aggie@thepentagon.com wrote:
> On Thu, 27 May 1999 23:12:43 GMT, Bob Shair <bshair@itds.com>, in
> <7ikjh9$f3r$1@nnrp1.deja.com> wrote:
>
> + If you're suggesting that Perl should unilaterally change the
behaviour
> + of localtime() to (1) break all the code which was written properly
>
> Causing an even larger Y2K-ish problem...
>
> James
>
When did I ever suggest or imply that? That would be as stupid as the
original decision to return the value 100 for the year in the year 2000.
The creators of Perl had the opportunity to avoid this silliness but
chose, for who knows what reason, not do so. The same problem occurred
in Javascript and the language was changed in an attempt to 'fix' it.
This has caused an even greater problem with different versions doing
things differently.
My only aim in continuing this debate is to raise awareness that this is
a very real problem in Perl code, that Perl code is just as susceptible
to Y2K as any other language, that no language is immune and that all
applications need to be checked for Y2K problems.
Perl code is just as likely to have Y2K problems as any other language
and perhaps because of the booby trap code problem, more so.
Why does the Perl community persist in denying that their applications
could have Y2K problems instead of doing more to get the message out
that the code needs to be checked. The stance that the Perl developers
disputing this are taking is illogical, irresponsible and could cause
serious problems for the organisations that continue to use the Perl
code that remains unchecked.
Jocelyn Amon
--
Financial Solutions Limited
http://www.ts.co.nz/~finsol/
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 28 May 1999 04:40:25 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Perl Y2K compliant?
Message-Id: <x7btf5k2o6.fsf@home.sysarch.com>
>>>>> "f" == finsol <finsol@ts.co.nz> writes:
f> Why does the Perl community persist in denying that their applications
f> could have Y2K problems instead of doing more to get the message out
f> that the code needs to be checked. The stance that the Perl developers
f> disputing this are taking is illogical, irresponsible and could cause
f> serious problems for the organisations that continue to use the Perl
f> code that remains unchecked.
do you understand english? we DO NOT DENY that perl applications can
have y2k problems. what we are also telling youis to differentiate the
programming lanaguge perl from perl applications. perl has no y2k
problem, some perl applications have the problem. so it is up to the
programmer to resolve the bug, not the language.
do you get it? please respond to this message so i know you read it. the
language and its applications are different! a pencil is not a book. a
pencil is not libelous but a book can be. same for perl and its
applications reagrding y2k. what about this do you not grasp.
and if organizations want to continue to use perl, they should check
their APPLICATIONS for y2k bugs and not perl itself. and that includes
checking CPAN modules since they are not part of the perl distribution.
so stop calling us illogical and irresponsible. perl hackers are generally
very logical (they chose a good language to develop in) and responsible
(since perl puts the onus of responsibility back into the hands of the
programmer and not by using some language syntax manacles).
so spread your fud elsewhere as you have not shown either trait in this
thread.
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: Fri, 28 May 1999 09:44:50 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: FAQ 4.16: Does Perl have a year 2000 problem? Is Perl Y2K compliant?
Message-Id: <ebohlmanFCFsEq.2wK@netcom.com>
finsol@ts.co.nz wrote:
: Why does the Perl community persist in denying that their applications
: could have Y2K problems instead of doing more to get the message out
: that the code needs to be checked. The stance that the Perl developers
: disputing this are taking is illogical, irresponsible and could cause
: serious problems for the organisations that continue to use the Perl
: code that remains unchecked.
What the Perl community persists in denying is that Perl the language
has built-in Y2K problems. The Perl community unanimously affirms that
Perl code written by people who make guesses about what kind of data
localtime() returns, rather than inspecting the documentation for
localtime(), is very likely to have Y2K problems. The Perl community
vehemently denies that any of the following should be design goals for Perl
the language:
1) Making it impossible to write incorrect code. A programming language
in which it is impossible to write incorrect code is like a natural
language in which it is impossible to make a false statement; it's a
meaningless concept.
2) Making it easy for people to write code without understanding the
language. Perl was not intended to be a teaching language. There's a
tradeoff between ease of learning and ease of use, and Larry chose to
resolve it in favor of ease of use. Since this had the effect of making
the initial learning curve steeper, the Perl community came up with a
truly excellent documentation package that enables the Perl learner to
help him/herself up the learning curve if he/she is willing to put in the
effort.
Perl was developed well before the WWW explosion resulted in lots of "Web
page designers" deciding that they had to be able to write CGI code in
order to stay competitive. The Perl community has (rightly IMHO) shown
little interest in trying to make the language more "accessible" to
people who simply want to claim credentials as fast as possible without
doing their homework.
There is a view, frequently and sometimes unfairly attributed to
Microsoft, that a computer program, language, etc. should be designed so
that a newbie can make full use of it *while remaining a newbie*; that no
learning should be required. This is *not* part of the Perl philosophy,
which holds that learning the language increases one's power.
------------------------------
Date: Sat, 29 May 1999 10:46:27 +0200
From: "Pletschette Andri" <andre.pletschette@ltam.lu>
Subject: Getting Digits out of a String with m//
Message-Id: <7ill54$fqu$1@calais.pt.lu>
Why doesn't this work?
$pic = "123avdfjdf3dfaksfjd3323dkjf.jpg";
$pic =~ m@\d+\D@s;
$numb = $&;
print "$numb";
## $numb should become the first digits from $pic, so in this case 123.
## But the problem is that it only gets 1.
Thank You for anybody who can help out here :-)
And the user was out
------------------------------
Date: Thu, 27 May 1999 09:24:16 +0100
From: "Tobin" <Tobin@breathemail.net>
Subject: Hash problems?
Message-Id: <374e521d@news1.vip.uk.com>
Hi,
I would really appreciate it if anyone can look at the output of a database
search script on a prototype site I am developing
(www.freephonedirectory.com). It's the search panel in the bottom right of
the front page.
When the results appear the data is 'displaced' by 1 to 3 characters. The
data is grabbed from the DBF file using the Xbase module and put into a
multi-field hash. Is this displacement a hash thing?? It seems to work fine
lon my home pc but not on the Hypermart server!?!?
The page is only tested for MSIE4.x so far, so sorry about any compatibility
probs!
Any help would be appreciated. Thanks,
Tobin
------------------------------
Date: Fri, 28 May 1999 08:12:40 GMT
From: tvn007@my-deja.com
Subject: Help on Regular Xpression
Message-Id: <7ilj5n$533$1@nnrp1.deja.com>
Hi,
Would someone please help me to reduce the code below ?
(There must be a better solution !)
Here is my solution:
####################################3
while ( <INFILE> ){
chomp;
s/_//g;
s/Z/X/g;
s/Y/X/g;
s/M/X/g;
s/\'//g;
s/0/l/g;
s/1/h/g;
s/L/0/g;
s/H/1/g;
s/l/L/g;
s/h/H/g;
s/\'//g;
s/SETR/R1 ddc1/g;
s/P:=T//g;
print OUTFILE ("$_ ;\n");
}
###################################
Thanks in advance for your help,
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 28 May 1999 04:44:55 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Help on Regular Xpression
Message-Id: <x77lptk2go.fsf@home.sysarch.com>
>>>>> "t" == tvn007 <tvn007@my-deja.com> writes:
t> s/Z/X/g;
t> s/Y/X/g;
t> s/M/X/g;
t> s/0/l/g;
t> s/1/h/g;
t> s/L/0/g;
t> s/H/1/g;
t> s/l/L/g;
t> s/h/H/g;
whenever you do a s/// with single chars, think about using the tr
(translate) function. it is designed for that very operation and it can
handle all the above translations in one operation.
t> s/_//g;
t> s/\'//g;
t> s/\'//g;
a tr with the delete option will do those and much faster.
and you had 2 deletes of ' there too.
t> s/SETR/R1 ddc1/g;
t> s/P:=T//g;
those are multichar strings so leave them as s///.
hth,
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: Fri, 28 May 1999 11:37:15 -0700
From: Michael Watzl <michael.watzl@tesis.de>
Subject: How to call real RPCs w/ perl
Message-Id: <374EE25B.9DB6C1A1@tesis.de>
Hello,
is there a way to do RPCs via perl? I examined the modules
pRPC and PlRPC and I think they are a standalone solution.
I need to call functions of an rpc server which are registered
to the system - e.g. visible via rpcinfo.
thanks,
Michael Watzl
_________________________________________________________
TESIS SYSWare GmbH Tel: 089/747377-29
EMail: michael.watzl@tesis.de Fax: -99
------------------------------
Date: 28 May 1999 08:48:27 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Perl "constructors"
Message-Id: <slrn7ksm2r.fvf.sholden@pgrad.cs.usyd.edu.au>
On Fri, 28 May 1999 06:35:04 GMT, armchair@my-deja.com wrote:
>In article <slrn7khv24.b8g.sholden@pgrad.cs.usyd.edu.au>,
> sholden@cs.usyd.edu.au wrote:
>> On Mon, 24 May 1999 05:11:36 GMT, armchair@my-dejanews.com wrote:
>> >In article <slrn7kh4dk.6qs.sholden@pgrad.cs.usyd.edu.au>,
>> > sholden@cs.usyd.edu.au wrote:
>> >> On Sun, 23 May 1999 16:41:48 GMT, armchair@my-dejanews.com wrote:
>> >> >
>> >> >I did a wc the other day and I am up to 2000 lines
>> >> > (counting comments
>> >> >and blanks and { } etc., of Perl. If it wasn't for this
>> >> > thread I would
>> >> >be well over a 100,000 by now!
>> >>
>> >> So without this thread you would have written code an
>> >> order of magnitude
>> >> or so faster than any measurement of programming rates I
>> >> have ever seen.
>> >> Do you test your code? Do you cut and paste or something to
>> >> increase your
>> >> lines of code / day? Or do you make numbers up?
>> >
>> >Are your programming metrics based on international data, or just
>> >figures gathered in Australia? Don't forget that America is taking in
>> >hundreds of thousands of young A grade average programming
>> > students from
>> >Asia each year. Not to mention James Gosling, Linus Torvalds
>> > and Bjarne
>> >Stroustrup. It's really competitive over here - I'm actually one
>> > of the
>> >slow ones. But despite advancing age, I have used my
>> > resourcefulness to
>> >raise my lines of code (LOC) output threefold recently. Since
>> > you're an
>> >ocean away and not a threat, I can let you in on a part of my new
>> >technique:
>>
>> The old data I have is for American programmers...
>>
>> In 1969 John Harr from Bell Labs reported coding rates of
>> 500-2300 words/year
>> for the average programmer. That is finished code though, and
>> doesn't count
>> code written that was not used in the final product.
>>
>> Data from OS/360 at IBM gave productivities in the range of
>> 6-800 debugged
>> instructions per year perl person for control program code.
>> For language
>> translation code the rate was 2-300 debugged instructions.
>>
>> For non-assembly programming there is MIT's data on MULTICS with
>> gives 1200
>> lines of debugged PL/I statements per year per person. Note this
>> is in the
>> same ball-park as Harr's results for assembler except it is
>> lines not words.
>>
>> As for linux, I just downloaded kernel 2.2.3 and ran the command
>> wc -l `{find . -name '*.c'} #excuse the shell syntax....
>> Giving :
>>
>> 1399646 total
>>
>> So 1.4 million lines of code
>>
>> grepping for ^N:' in the CREDITS file gives about 280 names.
>>
>> Linux was released in 1991 so it has been written over 8 years.
>>
>> So we have a rate of 175000 lines of code per year.
>>
>> But it has not been written by one person it has been written
>> by 280 people.
>
>Here's where I think you tripped up in your calculations. Linux was
>written over a period of 8 years, but most of it was written by one
>fellow. No need to include all his pizza buddies and hangers on. And I
>happen to know that he has been resting on his laurels for quite a few
>years now. Like most great talents, his output was far from constant.
>The last few years has found him watching more Nick at Night than
>coding. My estimates are that he wrote 70% of the 1.4 million lines of
>code in in first two years, and 50% in the first year.
I'm sure the people that wrote over 80% of the linux kernel will be
pleased to know you refer to them as hangers on. If you read the
CREDITS file you'll see how large the non-Linus contribution is.
Here's a sample from 1.0 :
N: Theodore Ts'o
E: tytso@mit.edu
D: Random Linux hacker
D: Maintainer of tsx-11.mit.edu ftp archive
D: Maintainer of c.o.l.* Usenet<->mail gateway
D: Author of serial driver
D: Author of the new e2fsck
D: Author of job control and system call restart code
D: Author of ramdisk device driver
D: Author of loopback device driver
S: MIT Room E40-343
S: 1 Amherst Street
S: Cambridge, Massachusetts 02139
S: USA
You say Linus hasn't coded much in the last few years. Since 66% of the kernel
was written in the last 3 years why do you claim he wrote 70% in the
first two years. Maybe because you have no idea what you are talking about
and are just lieing to back up what you have said.
These facts are easy to check, but you persist in just making stuff up that
suits your arguments.
When 2.0.0 was released in 1996 there were 563104 lines of code in the
.c files of the linux kernel. And 190 names were listed in the CREDITS
file.
So in 5 years of development there were about half a million lines of
code written. That works out as 100000 lines of code per year.
That is wrong though, since linux development has been speeding up. So what
about 1.0?
1.0 was released in 1994 and contained 176318 lines of code. Your claim of
70% being written in the first two years is obviously completely false.
If you new anything about linux you would realise this. At that stage 80
names were in the CREDITS file.
The reason there is so much code is because of the relatively recent porting
effort. This has not been done by Linus. The last I heard was that Linus
claimed to have written about 20% of the kernel code. This was before a
major port though, and will have only gone down over time. Alan Cox is the
major contributor at the moment.
>That would be a
>first year rate of 700K per year. But that is debugged and tested and
>kept code, versus all code, whether used or usable or not. I am just
>talking about any old Perl code I would write to learn a concept, which
>comes out a much faster rate. Were it to be fully usable and marketable
>Perl code, I would estimate my rate at 20,000 per 10 day period which is
>very close to what Torvalds was putting out back in that first year,
>when he had the excitement of starting out.
Why do you keep making things up when they are easy to check.
linux kernel v0.96c was released in 1992. So it reflects approximately
one year of linux development. You claim it should be 700000 lines of code.
Well a line count on *.c files gives :
26708 lines of code.
So you could single handedly do one year of development in two weeks?
Instead of making stuff up and claiming it is fact why don't you do some
research? Or can you just not accept that you have no idea what you are
talking about.
I'm counting tested and debugged code. Non-tested code is not code. It is
random crap that doesn't work. I can write a million lines of code a day
if it doesn't have to work.
20,000 lines per ten day period would have compressed three years of kernel
development into under 3 months. Do you have any idea what you are talking
about?
If you would think about your numbers before basing arguments on them
you may have more success.
>As far as those other studies, apparently they are including various
>testers, managers, staff relatives and HR types in the coding headcount.
>That really lowers the numbers.
How do you know? Did you check, or are you just making stuff up because it
doesn't agree with your argument?
I know at least two of the studies I got my data from only included
programmers. Why are you lieing?
--
Sam
Every human culture has good and bad points. Every computer program has
Eveone more bug. Even Perl.
--Larry Wall
------------------------------
Date: 28 May 1999 08:51:12 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Perl "constructors"
Message-Id: <slrn7ksm80.fvf.sholden@pgrad.cs.usyd.edu.au>
On Fri, 28 May 1999 06:43:06 GMT, armchair@my-deja.com wrote:
>In article <7ibtsd$5qk$1@nnrp1.deja.com>,
> John Porter <jdporter@min.net> wrote:
>> In article <7i5e9d$76$1@nnrp1.deja.com>,
>> armchair@my-dejanews.com wrote:
>
>>
>> > But since you are, give me the percentage breakdown
>> > on how Perl is being used (CGI-BIN, database scripts, sysadmin
>> > functions) and what percentage of their time Perl programmers are
>> > maintaing the code of others? And what is a typical size for a Perl
>> > program? How many people are using objects
>> > exstensively? inheritance?
>> > Is
>> > the stuff on CPAN getting good usage at each site?
>>
>> Sorry, I don't know what the real numbers are.
>> But I do know that your guess about what "most Perl programmers"
>> have done was really arrogant.
>
>Without real numbers how could you know? Are we to go on your last
>project as evidence of what most Perl programmers are doing? And what of
>your CPAN code usage and that of the five programmer who preceded you on
>your last project?
That's a bit hypocritical coming from Mr 'Linus Torvalds wrote 700000 lines
of linux code in two years'.
You can't criticise others for making statements without knowing the
exact real numbers. At least they admit that, as opposed to just making some
convenient numbers up as you like to do.
--
Sam
these days you're allowed to patent natural laws, and even other people's
genomes.
-- Tom Christiansen in <374b0ddd@cs.colorado.edu>
------------------------------
Date: Fri, 28 May 1999 09:26:41 +0200
From: Antonio Gulli <gulli@ideare.com>
Subject: perlcc and multiples modules
Message-Id: <374E4530.4339431A@ideare.com>
Hello, i'm trying to compile a lot of module M1.pm M2.pm .. Mn.pm
and a script S1.pl that uses M1.pm .. Mn.pm.
If i compile the S1.pl and retain the M1.pm Mn.pm everything is
OK
But if i try to compile them at all whenever i start the compiled script
it warnes me not to find the module ?
So where i'm wrong ?
--
Antonio Gulli' whois: gulli
gulli@ideare.com
------------------------------
Date: Fri, 28 May 1999 08:23:35 GMT
From: shreeve@uci.edu (Steve Shreeve)
Subject: Put my() inside or outside a loop?
Message-Id: <7iljp0$b9r@news.service.uci.edu>
When I use my() variables, should I put the my() statement inside of a loop or
outside? I would *think* that by putting the my() outside of the loop it would
be quicker because it would not be "called" over and over... Yet, look at the
following results (at the end).
Can someone explain why it's better to put the my() inside the loop?
Furthermore, why is Try3 as good as or better than Try1? This all seems sort
of odd to me...
Please let me know you comments by sending me email directly as well as
replying to this post...
Thanks!
Steve Shreeve
UC Irvine, MD/MBA/EE
====================
Benchmark: timing 1000 iterations of Name1, Name2, Name3, Name4...
Try1: 3 secs ( 2.64 usr 0.00 sys = 2.64 cpu)
Try2: 3 secs ( 3.21 usr 0.00 sys = 3.21 cpu)
Try3: 2 secs ( 2.62 usr 0.00 sys = 2.62 cpu)
Try4: 4 secs ( 3.16 usr 0.00 sys = 3.16 cpu)
====================
#!/usr/bin/perl
use Benchmark;
my $max_coun = 100;
my $coun;
timethese(1000, {
'Try1' => sub {
$coun=$max_coun;
while ($coun-- > 0) {
my($l,$m,$n,$o,$p,$q,$r) = &values;
my $text = $l . $m . $n . $o . $p . $q . $r;
}
},
'Try2' => sub {
$coun=$max_coun;
my($l,$m,$n,$o,$p,$q,$r);
while ($coun-- > 0) {
($l,$m,$n,$o,$p,$q,$r) = &values;
my $text = $l . $m . $n . $o . $p . $q . $r;
}
},
'Try3' => sub {
$coun=$max_coun;
my $text;
while ($coun-- > 0) {
my($l,$m,$n,$o,$p,$q,$r) = &values;
$text = $l . $m . $n . $o . $p . $q . $r;
}
},
'Try4' => sub {
$coun=$max_coun;
my($l,$m,$n,$o,$p,$q,$r);
my $text;
while ($coun-- > 0) {
($l,$m,$n,$o,$p,$q,$r) = &values;
$text = $l . $m . $n . $o . $p . $q . $r;
}
},
});
sub values {
return (10..20);
}
------------------------------
Date: Fri, 28 May 1999 09:51:41 GMT
From: NukeEmUp@ThePentagon.com (David Cantrell)
Subject: Re: Y2K infected Perl code
Message-Id: <374f6526.69494377@news.insnet.net>
On Fri, 28 May 1999 02:16:03 -0400, planb@newsreaders.com (J. Moreno)
enlightened us thusly:
> javascripts inconsistent usage on the other hand sounds like
>a real problem
It certainly is. The main problem I've come across is that
originally, the spec was that for dates in the 20th century (actually
1900-1999 but ...) years were two digits, and any other date from
CE100 onwards used three or four digit years. They changed this
later. Many people - myself included - ended up with code being
broken and not realising it. I'd tested it for Y2K compliance
originally and didn't realise that it was no longer compliant.
Grumble. Mutter.
[Copying newsgroup posts to me by mail is considered rude]
--
David Cantrell, part-time Unix/perl/SQL/java techie
full-time chef/musician/homebrewer
http://www.ThePentagon.com/NukeEmUp
------------------------------
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 5813
**************************************