[8905] in Perl-Users-Digest
Perl-Users Digest, Issue: 2522 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 6 22:07:32 1998
Date: Wed, 6 May 98 19:00:57 -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 Wed, 6 May 1998 Volume: 8 Number: 2522
Today's topics:
Re: Bad free() ignored -- latest Perl not an option (Martien Verbruggen)
Re: CGI call: open or save as file??? <hrowe@erinet.com>
Re: Challange for perl `GURUS` (Martien Verbruggen)
Re: Connecting to a share (Martien Verbruggen)
Re: Converting Perl to C (Martien Verbruggen)
Re: Date::Manip on NT <sowmaster@juicepigs.com>
Re: Embedded systems programming (Ken Fox)
Re: Ever Wonder Why Not Everyone Uses Modules? (Ilya Zakharevich)
Re: Ever Wonder Why Not Everyone Uses Modules? <jsd@gamespot.com>
Re: Ever Wonder Why Not Everyone Uses Modules? <danboo@negia.net>
Re: exists and -w messages (Martien Verbruggen)
Re: From Linux/perl to MS SQL <david@npis.com.tw>
from module, how to access vars from main's namespace <akushner@lebeaux.cup.hp.com>
Re: from module, how to access vars from main's namespa <tchrist@mox.perl.com>
Re: from module, how to access vars from main's namespa <akushner@cup.hp.com>
Re: Hash value length limit? (Martien Verbruggen)
Re: Hash value length limit? (Martien Verbruggen)
Re: Hash value length limit? <danboo@negia.net>
Re: How old is Perl? (Martien Verbruggen)
Re: Huge array/Win32::NetAdmin::GetUsers <jfelso@NOSPAM.att.com>
Lngest running & biggest thread in content? [Was Re: E <webmaster@fccjmail.fccj.org>
Re: Looking for Perl parser for 'C' language input file (Ilya Zakharevich)
newbie question about system call <7twh@ttc-cmc.net>
perl script for zone files <tch@interport.net>
Re: Perl Socket and proxy Server <test@net.net>
Re: Perl/Wall lingo question (Ken Fox)
Re: Perl/Wall lingo question (Stephen O. Lidie)
PLEASE HELP -ASCII file saved <dcc1234@pacific.net.sg>
Re: running perl as a service? (Martien Verbruggen)
Re: Running script as background program. (Martien Verbruggen)
Re: Sending perl HTML output to diffrent frames (Martien Verbruggen)
settime <frankmeng@usa.net>
Re: stat function (Martien Verbruggen)
Strange parsing problem with perl5.004_04 (Charles J. Leslie)
Re: system ("$progname"); does not work. Why? (Martien Verbruggen)
Win95 Perl scripts DONT WORK on UNIX <phlin@ix.netcom.com>
Re: Win95 Perl scripts DONT WORK on UNIX <webmaster@fccjmail.fccj.org>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 6 May 1998 23:42:53 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Bad free() ignored -- latest Perl not an option
Message-Id: <6iqsht$fp1$8@comdyn.comdyn.com.au>
In article <FBbMkGA1YIU1EwMi@wndrwrks.demon.co.uk>,
Andy Armstrong <andy@wonderworks.co.uk> writes:
> We're currently developing a CGI script which works well locally but
> fails with "Bad free() ignored" when installed on our public server
> (which is hosted by our ISP).
>
> Unfortunately our ISP is still running 5.001 and there's no prospect of
> changing this in the near futyre.
It does look like your ISP has a broken perl installation. They really
should upgrade. If they are not willing, point them to
http://www.cert.org/advisories/CA-97.17.sperl.html
http://www.cert.org/advisories/CA-96.12.suidperl_vul.html
Also tell them to search dejanews for the numerous mentions of the
bugginess of older perls. They should be running the latest version,
if not to accomodate their clients, then just for their own security.
I'd just leave an ISP with an attitude like that, though.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | Make it idiot proof and someone will
Commercial Dynamics Pty. Ltd. | make a better idiot.
NSW, Australia |
------------------------------
Date: Wed, 6 May 1998 21:33:13 -0400
From: "Harry Rowe" <hrowe@erinet.com>
Subject: Re: CGI call: open or save as file???
Message-Id: <6ir33r$qdr@eri.erinet.com>
Thomas Hack wrote in message <35500364.7AEA@metronet.de>...
>Hi there,
[snip]
>But instead of processing the form, a windows pops up:
>" Download of a file from this location
> test.pl from c:\inetpub\wwwroot\cgi-bin
> - open file from current location
> - save file to disk
>
What is the first line of your script? The server needs to
know its an executable.
The Xitami server, for example, needs #! perl as
the first line or you will get the same action.
Regards,
Harry
------------------------------
Date: 6 May 1998 23:50:19 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Challange for perl `GURUS`
Message-Id: <6iqsvr$fp1$9@comdyn.comdyn.com.au>
In article <3551CC76.99EB8CD4@exodus.net>,
vimal gajjar <vgajjar@exodus.net> writes:
> Hi there,
> Here is a small challange. Is it possible to have a perl
> code which takes e.g. three parameters as input. time, val1, val2. and
> the name of the prog. is say challange.pl. Now if i execute
I take this to mean: pure perl code, no C Xsub stuff, etc.
> "challange.pl 10 5 2" this perl script wille consume
> 5% of cpu
There is no way to do this from within perl, AFAIK. I am not even
sure if this can be done in any other way. It certainly can't be done
platform independently. This very very low level OS functionality is
normally not available to mere mortals.
> 2 Mb of RAM
There is no reliable way to do this. Apart from memory you allocate
yourself within the perl script, there are other things going on. Hard
to figure out, platform dependent, etc. On my system,
# perl -e 'sleep 10'
shows up like this in top:
PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
2515 mgjv 23 0 2136K 1736K sleep 0:00 0.07% 0.03% perl5.00404
As you can see, the size is already larger than 2 MB.
> for the period of 10 Seconds.
sleep(10);
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | I took an IQ test and the results were
Commercial Dynamics Pty. Ltd. | negative.
NSW, Australia |
------------------------------
Date: 7 May 1998 01:33:44 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Connecting to a share
Message-Id: <6ir31o$gfq$5@comdyn.comdyn.com.au>
In article <3550F676.409C@hp.com>,
Angela Molnar <angela_molnar@hp.com> writes:
> Hello,
>
> Is there a way, using NT Perl, to connect to a share on another server,
> either UNIX or NT, read a file, and close the share? A code example
> would really be helpful.
That will depend on what the 'share' is. SMB? NFS? Something else?
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | Advertising: The science of arresting
Commercial Dynamics Pty. Ltd. | the human intelligence long enough to
NSW, Australia | get money from it.
------------------------------
Date: 7 May 1998 00:27:53 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Converting Perl to C
Message-Id: <6iqv69$g2p$5@comdyn.comdyn.com.au>
In article <6iqa43$37r@mailgate.lexis-nexis.com>,
jimmey@lexis-nexis.com (Jimmey Todd) writes:
> Has anyone written a program which will convert Perl to C? Unfortunately,
> not everyone has/wants Perl...
>
> And, yes, I have read the FAQ....
Have you seen the entry in perlfaq3, with the title 'How can I compile
my Perl program into byte code or C?'?
At the moment, I think that is the only way.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | Very funny Scotty, now beam down my
Commercial Dynamics Pty. Ltd. | clothes.
NSW, Australia |
------------------------------
Date: Wed, 06 May 1998 20:15:10 -0400
From: Bob Trieger <sowmaster@juicepigs.com>
Subject: Re: Date::Manip on NT
Message-Id: <3550FD0E.5F0B@juicepigs.com>
Jonathan Feinberg wrote:
> iug piug <hjf@companyname1.com> writes:
>
> > I'm trying to use Date::Manip on a NT box. I include "use Manip;"
> > (without quotes) because "use Date::Manip;" (without quotes) causes
> > "Can't locate Date/Manip.pm..." to display.
---> snip mom's cooking <---
> Yes. Perl can't find Date::Manip because you haven't installed it.
> You'll find Date::Manip at the CPAN:
Date::Manip is included in the standard win32 port.
--
Bob Trieger | Titanic: big boat, bigger
sowmaster@juicepigs.com | iceberg, big deal
------------------------------
Date: 7 May 1998 00:22:28 GMT
From: kfox@pt0204.pto.ford.com (Ken Fox)
Subject: Re: Embedded systems programming
Message-Id: <6iqus4$64r4@eccws1.dearborn.ford.com>
Hugh_Dunne@nospam.com (Hugh Dunne) writes:
> This strikes me as bogus. I've done a lot of work on satellite-borne
> embedded systems and I can tell you that perl is not going into space any
> time in the forseeable future
Didn't a laptop running Linux go up on a shuttle? That probably had
perl running on it.
> nor is it going to be the language of choice for number-crunching!
Haven't you seen PDL? It's a pretty cool tool for number crunching.
> you are never going to have a Swiss army knife which beats the best
> available tool in every given situation.
Of course not. But when all I've got is a swiss army knife, I'm
awfully happy to use it. Besides, perl works very well embedded
in other languages/tools so I'd say its attitude (if a language
can have an attitude) is pretty humble.
- Ken
--
Ken Fox (kfox@ford.com) | My opinions or statements do
| not represent those of, nor are
Ford Motor Company, Powertrain | endorsed by, Ford Motor Company.
Analytical Powertrain Methods Department |
Software Development Section | "Is this some sort of trick
| question or what?" -- Calvin
------------------------------
Date: 7 May 1998 00:56:42 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <6ir0sa$6us$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Stuart McDow
<smcdow@arlut.utexas.edu>],
who wrote in article <6iqpei$s15$1@ns1.arlut.utexas.edu>:
> Art Cohen <upsetter@shore.net> writes:
> >
> > ... if everybody used Unix for everything there'd be no problem ...
>
> Agreed.
*Most* unportability of Perl comes from *nix. Read Configure if you
do not believe.
Porting would be easier by *tons* if there were no *nix around.
Ilya
------------------------------
Date: Wed, 06 May 1998 17:48:51 -0700
From: Jon Drukman <jsd@gamespot.com>
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <355104F2.B86910FF@gamespot.com>
Brett Tabke wrote:
> How is encouraging people to write there own programs greedy or
> in any way spoiled?
it's fine but then what happens is you get three zillion different
competing HTML parsers/mail senders/whatever and supporting it all is a
nightmare. presumably the effort invested in writing a new module from
scratch might be better spent improving the current one. (i bet most
module authors would welcome a performance-boosting patch, or
documentation improvements.)
> If the answer to every question becomes "just use module X" then we
> are turning Perl from programming community into a simple user base.
> (which is already happening).
and this is bad because... why?
the only reason that the answer to every question is "use module X" is
because of the shockingly poor quality of the questions. "how do i do a
web page hit counter" "how do i find the title of an html document"
etc... when people start asking for new and crazy stuff then new modules
will be born. bet on it.
> Look, I am just trying to fight a little for the future of Perl and
> its vast diversity.
i would rather the diversity were in the KIND of modules, rather than
the QUANTITY... you are encouraging people to rewrite perfectly good
things over and over again...
> If we all do things the exact same way with the
> exact same routines,
then helping each other is a lot easier.
i'd rather people understood the pros & cons... using HTML::Parser to
find the title of a document is probably overkill for 95% of quick jobs
that people need to do... but people should understand when and why
using the full module is appropriate vs dropping in a quick regex...
--
Jon Drukman jsd@gamespot.com
-----------------------------------------------------------------------
Plan: Eat right, exercise regularly, die anyway.
------------------------------
Date: Wed, 06 May 1998 20:08:55 -0400
From: Dan Boorstein <danboo@negia.net>
Subject: Re: Ever Wonder Why Not Everyone Uses Modules?
Message-Id: <3550FB97.8417322E@negia.net>
Leslie Mikesell wrote:
>
> In article <gburnoreEsK15D.FE0@netcom.com>,
> Gary L. Burnore <gburnore@netcom.com> wrote:
[SNIP]
>
> >Telling someone to "quit whining" when they mention they'd rather not
> >receive email from you when you post is simply stupid.
>
> Huh? If you don't want replies, why post anything with your return
> address on it?
are you promoting the usage of fake addresses, or suggesting that the
previous poster not post at all if he doesn't want e-mail replies?
from rfc 1036 (Standard for Interchange of USENET Messages):
: 2.1. Required Header lines
:
: 2.1.1. From
:
: The "From" line contains the electronic mailing address of the
: person who sent the message, in the Internet syntax.
--
Dan Boorstein home: danboo@negia.net work: danboo@y-dna.com
"THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER."
- Cosmic AC
------------------------------
Date: 7 May 1998 00:08:32 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: exists and -w messages
Message-Id: <6iqu20$g2p$2@comdyn.comdyn.com.au>
In article <6iqlcc$2id$1@hecate.umd.edu>,
wayne@Glue.umd.edu (Wayne C. McCullough) writes:
> Whenever I use an exists command on a hash entry, and the
> command turns false, I get a warning if I have -w on. I
What's the warning? What does perldiag have to say about it? Are you
sure perl is complaining about the exists?
# perldoc perldiag
> understand the logic, but is there a way to supress that without
> turning off -w?
I don't have a warning
# perl -w
%h = ( aa => 1, bb => undef );
print "aa\n" if exists $h{aa};
print "bb\n" if exists $h{bb};
print "cc\n" if exists $h{cc};
__END__
aa
bb
> I mean, I am checking, not useing the value, just to make sure I
> don't get an error later, so why bitch when I check?
>
> Ok, maybe it is hopeless.
Maybe you should include the smallest snippet of code you can come up
with that produces that warning, and post that. Maybe you should also
mention the version of perl (perl -v), and the exact warning you get.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | You can't have everything, where would
Commercial Dynamics Pty. Ltd. | you put it?
NSW, Australia |
------------------------------
Date: Thu, 7 May 1998 07:49:54 +0800
From: "David Upham" <david@npis.com.tw>
Subject: Re: From Linux/perl to MS SQL
Message-Id: <6iqueu$2v9@news.seed.net.tw>
Go to http://www.brodeur.com/~pjacob/dbdsybase/
Mr. Jacob has an excellent tutorial on how to get Sybperl running on a Linux
box. This will also work with MS SQLServer on NT.
Good Luck
--
David Upham
Nan Pao Information Systems, Inc.
Tel: 886-2-2816-5511 ext. 35
Fax: 886-2-2813-2111
E-Mail: david@npis.com.tw
Artur R. Czechowski wrote in message <6ipijh$2n8$1@kerigma.cyf.gov.pl>...
>Hello
>I have a NT box with MS SQL server. There are some databases which I cannot
>move to other platform. I have a 2nd box with Linux and perl 5.004. I need
>to have to access from perl scripts to data collected on MS-SQL. What I
need
>to do it? Please, give me descriptions as for idiot - step by step.
>HELP!
>
>PS. Commercial sollution also will be satisfied for me.
>PS2. Sorry about my terrible english.
>
>Regards
> Artur
>--
>Artur R. Czechowski <arturcz@kerigma.cyf.gov.pl>
>See http://pgp.icm.edu.pl/pks/ for PGP public key
------------------------------
Date: 7 May 1998 00:48:48 GMT
From: Aaron Kushner <akushner@lebeaux.cup.hp.com>
Subject: from module, how to access vars from main's namespace
Message-Id: <6ir0dg$p8c$1@ocean.cup.hp.com>
Mark-Jason Dominus <mjd@op.net> wrote:
> If calling a function in another package gives you the willies for
> some silly reason, you can have the module do
> *log_error = \&main::log_error;
> to import it; then log_error(...) will be the same as main::log_error(...);
Mark's suggestion worked great, but why can't I do the same thing
with scalars? The following two print statements in the module below
do not print the value from main::, but the logmessage function works
fine. What am I missing?
package vtest;
BEGIN {
# $Exporter::Verbose=1;
use Exporter();
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
@ISA = qw(Exporter);
@EXPORT = qw(&vartest);
#@EXPORT_OK = qw();
#%EXPORT_TAGS = {};
}
*lfile = \$main::logfile;
*logmessage = \&main::logmessage;
print $lfile;
print $main::logfile;
logmessage("test from vtest.pm");
------------------------------
Date: 7 May 1998 00:55:00 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: from module, how to access vars from main's namespace
Message-Id: <6ir0p4$rt9$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
Aaron Kushner <akushner@lebeaux.cup.hp.com> writes:
:The following two print statements in the module below
:do not print the value from main::, but the logmessage function works
:fine. What am I missing?
You're forgetting to show us main's code, or the output.
:*lfile = \$main::logfile;
:*logmessage = \&main::logmessage;
:print $lfile;
:print $main::logfile;
Those work perfectly fine. My guess is that your confused
packages and scopes, that is, dynamically versus lexically
scoped variables respectively. There is another possibility
involving save_and_restore (aka local), but I doubt that's it.
--
Tom Christiansen tchrist@jhereg.perl.com
I've got plenty of inputs and outputs. I don't need the video. --Andrew Hume
------------------------------
Date: 7 May 1998 01:32:07 GMT
From: Aaron Kushner <akushner@cup.hp.com>
Subject: Re: from module, how to access vars from main's namespace
Message-Id: <6ir2un$p8c$2@ocean.cup.hp.com>
Sorry about not having the rest of the code, I was trying not to
have too much clutter.
=============================== module ==========================
package vtest;
BEGIN {
# $Exporter::Verbose=1;
use Exporter();
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
@ISA = qw(Exporter);
@EXPORT = qw(&vartest);
}
*lfile = \$main::logfile;
*logmessage = \&main::logmessage;
sub vartest {
print "module vtest: sub vartest: logfile: |$lfile| |$main::lfile|\n";
main::logmessage("message from vartest in module vtest");
}
1;
============================main program ==========================
#!/usr/bin/perl
use strict;
use diagnostics;
use vtest qw(&vartest);
my $lfile = "/tmp/gunk";
my $log_proc = \&logmessage;
main();
sub main {
vartest();
}
sub logmessage {
my @msg = @_;
print "This is the message: @msg\n";
}
============================ output ==== ==========================
Use of uninitialized value at vtest.pm line 23 (#1)
(W) An undefined value was used as if it were already defined. It was
interpreted as a "" or a 0, but maybe it was a mistake. To suppress this
warning assign an initial value to your variables.
module vtest: sub vartest: logfile: || ||
This is the message: message from vartest in module vtest
Tom Christiansen <tchrist@mox.perl.com> wrote:
> [courtesy cc of this posting sent to cited author via email]
> In comp.lang.perl.misc,
> Aaron Kushner <akushner@lebeaux.cup.hp.com> writes:
> :The following two print statements in the module below
> :do not print the value from main::, but the logmessage function works
> :fine. What am I missing?
> You're forgetting to show us main's code, or the output.
> :*lfile = \$main::logfile;
> :*logmessage = \&main::logmessage;
> :print $lfile;
> :print $main::logfile;
> Those work perfectly fine. My guess is that your confused
> packages and scopes, that is, dynamically versus lexically
> scoped variables respectively. There is another possibility
> involving save_and_restore (aka local), but I doubt that's it.
------------------------------
Date: 7 May 1998 00:15:25 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Hash value length limit?
Message-Id: <6iquet$g2p$3@comdyn.comdyn.com.au>
In article <6iq6kh$ane$1@dane.cslab.vt.edu>,
David La Croix <dlacroix@cray-ymp.acm.vt.edu> writes:
>
> I inherited an application that uses a hash of hashes for internal
> data storage (similar to the example I have fabricated below).
>
> I am experiencing a phenomenon where the value appears to be truncated
> at about 250 bytes. Is this a limit or a bug?
Not a limit...
# perl -v
This is perl, version 5.004_04 built for sun4-solaris
And the following doens't get truncated anywhere, and it shouldn't.
$hash1{'key1'} = {
subkey1 => "20",
subkey2 => "",
subkey3 => "Pile & Co., Boston ",
subkey4 => "kjghdfldshaflkjhasdflkhaslkdfjhlkajhsdflkjhasdlkfjhlaksjdhflkjahsdflkjhasdlkfjhlaskdjhflkasjdhflkjhsdalfkjhsadlkjfhd0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890ksdjfsd"
};
print $hash1{key1}->{subkey4}, "\n";
> This application saves the data to a file in perl syntax (so it can be
> sucked back in by a require). This should not be limiting the length
> of the records, right???
It might depend on how you save. The problem is not in perl, AFAIK,
and it's not in the code you submitted, My guess is that there is a
problem somewhere else. Have you checked what is in the file you
require?
Do you maybe use write with formats somewhere? A printf with some
limit?
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | Inside every anarchy lurks an old boy
Commercial Dynamics Pty. Ltd. | network - Mitchell Kapor
NSW, Australia |
------------------------------
Date: 7 May 1998 00:16:17 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Hash value length limit?
Message-Id: <6iqugh$g2p$4@comdyn.comdyn.com.au>
In article <6iq6kh$ane$1@dane.cslab.vt.edu>,
David La Croix <dlacroix@cray-ymp.acm.vt.edu> writes:
> This application saves the data to a file in perl syntax (so it can be
> sucked back in by a require). This should not be limiting the length
> of the records, right???
Another thing: If you need to save structures like this for later
reads, you might want to have a look at Data::Dumper
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au |
Commercial Dynamics Pty. Ltd. | What's another word for Thesaurus?
NSW, Australia |
------------------------------
Date: Wed, 06 May 1998 19:41:12 -0400
From: Dan Boorstein <danboo@negia.net>
Subject: Re: Hash value length limit?
Message-Id: <3550F518.813DA1CB@negia.net>
David La Croix wrote:
>
> I inherited an application that uses a hash of hashes for internal
> data storage (similar to the example I have fabricated below).
>
> I am experiencing a phenomenon where the value appears to be truncated
> at about 250 bytes. Is this a limit or a bug?
>
> $hash1{'key1'} = {
> subkey1 => "20",
> subkey2 => "",
> subkey3 => "Pile & Co., Boston ",
> subkey4 => ...
[SNIP]
to be sure, you realize the value for subkey4 is only 241 characters,
right?
> This application saves the data to a file in perl syntax (so it can be
> sucked back in by a require). This should not be limiting the length
> of the records, right???
what kind of file? is it a DBM? if so, which?
--
Dan Boorstein home: danboo@negia.net work: danboo@y-dna.com
"THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER."
- Cosmic AC
------------------------------
Date: 7 May 1998 00:02:19 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: How old is Perl?
Message-Id: <6iqtmb$g2p$1@comdyn.comdyn.com.au>
In article <3550DE76.B410C9BA@gulf.uvic.ca>,
"K. Viggers" <kviggers@gulf.uvic.ca> writes:
> I was just hoping that someone could tell me when Perl began its
> exsistence.
> Thanks
Have a look at:
http://www.oasis.leo.org/perl/src/00-index.html
perl 1.0 seems to have been dated 31 Jan 1988.
Of course, a lot of work had already been done before that.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | I took an IQ test and the results were
Commercial Dynamics Pty. Ltd. | negative.
NSW, Australia |
------------------------------
Date: Wed, 6 May 1998 21:40:50 -0400
From: "John Felso" <jfelso@NOSPAM.att.com>
Subject: Re: Huge array/Win32::NetAdmin::GetUsers
Message-Id: <6ir3f8$8t9@newsb.netnews.att.com>
I have ascertained that it is not a problem with having an 20,000 element
array. They problem is with Win32:NetAdmin:GetUsers. For some reason it
gobbles up entirely too much memory to fill an array with measly 20,000
users (it is an out of memory rather than an OS limit). My code dies with an
"Out of memory!" message while still in GetUsers. GetUsers works great for
retrieving small arrays of users though. My guess is that GetUsers is poorly
coded. I will report this to Activeware I guess.
John Felso
jfelso@NOSPAM.att.com
------------------------------
Date: Thu, 07 May 1998 00:55:18 GMT
From: Bill 'Sneex' Jones <webmaster@fccjmail.fccj.org>
Subject: Lngest running & biggest thread in content? [Was Re: Ever Wonder Why Not Everyone Uses Modules?]
Message-Id: <355104B3.C921DB37@fccjmail.fccj.org>
PMFJI:
Is this the longest running/biggest content thread yet???
Just curious, :-)
-Sneex-
____________________________________________________________________________
Bill Jones | FCCJ Webmaster | Voice 1-904-632-3089 | Fax 1-904-632-3007
Florida Community College at Jacksonville | 501 W. State St. | Jax, FL 32202
mailto:webmaster@fccjmail.fccj.org | http://webmaster.fccj.org/Webmaster
------------------------------
Date: 7 May 1998 00:51:30 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Looking for Perl parser for 'C' language input files
Message-Id: <6ir0ii$6i1$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to James O. Payne, Jr.
<jpayne@us.oracle.com>],
who wrote in article <354F60FA.6F7F@us.oracle.com>:
> Hello.
>
> I have a requirement to write a utility to do some not-so-simple
> search, modify, and replace type work on a large base of 'C' code.
> This work is to change some 'C' code written by third-party programmers
> into a format consistent with my company's proprietary 'C' standards.
So far nobody mentioned C::Scan. It is not to be used as a perfect
tool, but make a pretty good job in its domain (scanning headers for
valuable info).
Ilya
------------------------------
Date: Wed, 06 May 1998 19:43:42 -0600
From: Tim Hodges <7twh@ttc-cmc.net>
Subject: newbie question about system call
Message-Id: <355111CE.2723DD9B@ttc-cmc.net>
I am at a point in a perl program that I want to make a system call and
put the output it returns into an array. In particular, I want to go:
system "/usr/bin/diff $file1 $file2";
and then some how put what is returned into an array like @diffs
Can anyone point me the right direction. I read 'the camel' on system
calls but still cant figure it out. Thanks..
Tim Hodges
7twh@ttc-cmc.net
------------------------------
Date: Wed, 06 May 1998 20:46:47 -0400
From: Tommy Ho <tch@interport.net>
Subject: perl script for zone files
Message-Id: <35510477.A675F49C@interport.net>
Hi,
I'd like to run a script to modify lines in multiple DNS zone files. So
if I need to change an "A" record or "NS" records on 50 different zone
files all at once, I would need a perl script to do that.
Does anyone have any experience with this?
Thanks,
Tommy
------------------------------
Date: Thu, 07 May 1998 10:53:22 +1000
From: ayl <test@net.net>
Subject: Re: Perl Socket and proxy Server
Message-Id: <35510602.41C67EA6@net.net>
Martin,
Thank you for your advice.
The reason that I do not want want to use CPAN package is I am not sure
if I can install it as a local copy or I have to ask sys admin to do
this.
If I use a local copy, how can I use it?
BTW, I just want to get the html source file, not the full blown http
implmentation, thus I guess I can do it myself, at least I know exactly
what I am doing.
I read the relevent RFC already, but it does not work the way I expect.
>
> > BTW I dont want to use any of the CPAN module.
>
> If you don't want to use a module (and I am not even going to ask
> why), then I guess this is not really a perl question. You will need
> to implement all the protocols involved yourself. Ask on one of the
> comp.infosystems.www.* groups what the protocols are, where you can
> get the RFCs and how to implement them. Then use the perl builtins to
> open a socket connection to the proxy server, and send it the commands
> it expects. Do something useful with the response.
>
> Good luck for the coming few weeks :)
>
> Martien
> --
> Martien Verbruggen |
> Webmaster www.tradingpost.com.au | Very funny Scotty, now beam down my
> Commercial Dynamics Pty. Ltd. | clothes.
> NSW, Australia |
------------------------------
Date: 7 May 1998 00:11:34 GMT
From: kfox@pt0204.pto.ford.com (Ken Fox)
Subject: Re: Perl/Wall lingo question
Message-Id: <6iqu7m$64r3@eccws1.dearborn.ford.com>
jdporter@min.net (John Porter) writes:
> kfox@pt0204.pto.ford.com (Ken Fox) wrote:
> > Anyways, the math notation is useless in computer science (unless the
> > problem domain of the program you're writing is mathematics... ;)
>
> I don't think I'd agree with that. Computer science is built on
> mathematics.
Some people seem to think so anyways. ;) When was the last time
you formally proved the correctness of a program? Now when was the
last time you built an outline of a program? IMHO, computer science
(except for algorithm design and analysis) is much more closely
related to writing (i.e. literature).
> The fact that [2][5][1] looks a little different from (2,5,1)
> is really irrelevant.
The fact that they look similar is dangerously misleading!
Arrays are not vectors, although you can certainly represent
a vector with an array if that's the way you choose to model
the mathematical concept using the language. A *lot* of people
also represent vectors as $X and $Y. Or arrays of vectors
with @X and @Y.
Also consider an array of hashes. That can't possibly be
a vector because hashes are unordered!
Arrays are not vectors.
- Ken
--
Ken Fox (kfox@ford.com) | My opinions or statements do
| not represent those of, nor are
Ford Motor Company, Powertrain | endorsed by, Ford Motor Company.
Analytical Powertrain Methods Department |
Software Development Section | "Is this some sort of trick
| question or what?" -- Calvin
------------------------------
Date: 7 May 1998 01:04:29 GMT
From: lusol@turkey.cc.Lehigh.EDU (Stephen O. Lidie)
Subject: Re: Perl/Wall lingo question
Message-Id: <6ir1at$e8u@fidoii.cc.Lehigh.EDU>
Ken Fox (kfox@pt0204.pto.ford.com) wrote:
: jdporter@min.net (John Porter) writes:
: > kfox@pt0204.pto.ford.com (Ken Fox) wrote:
: > > Anyways, the math notation is useless in computer science (unless the
: > > problem domain of the program you're writing is mathematics... ;)
: >
: > I don't think I'd agree with that. Computer science is built on
: > mathematics.
: Some people seem to think so anyways. ;) When was the last time
: you formally proved the correctness of a program? Now when was the
: last time you built an outline of a program? IMHO, computer science
: (except for algorithm design and analysis) is much more closely
: related to writing (i.e. literature).
Hmm. A computer nerd by trade but a biologist by degree, I've always
held this hierarchy, in Makefile terminology:
biology: chemistry
chemistry: physics
physics: mathematics
e.g., the world view is described by mathematics.
Where to classify CS or linguistics? Ultimately it's a biological
function. I think.
------------------------------
Date: Thu, 07 May 1998 09:28:04 +0800
From: DAVID CHEW <dcc1234@pacific.net.sg>
Subject: PLEASE HELP -ASCII file saved
Message-Id: <35510E23.204366F5@pacific.net.sg>
Whenever I save file I use the following code:
open (FILE, ">logtxt.cgi");
print FILE $txt_to_be_save ;
close FILE;
The problem is THAT the file saved
may contain unneccessary carriage return \015
which disturbs the cgi program.
How do I save in ascii ?
Please sent help reply to my email
as I do not often visit this newsgroup
MANY Thanks,
david
------------------------------
Date: 7 May 1998 00:43:35 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: running perl as a service?
Message-Id: <6ir03n$gag$1@comdyn.comdyn.com.au>
In article <Pine.LNX.3.96.980506125025.5318A-100000@goofy.activework.com>,
Thaddeus Wakefield Batt <thaddeus@goofy.activework.com> writes:
> I'm looking to get pointed in the right direction towards speeding up some
> cgis. I'm wondering if anyone out there has tried compiling a perl
> interpreter into Apache so that perl-based cgis do not have to waste time
> launching a perl process.
It's called mod_perl.
> Or, alternately, can perl (or a perl script) be run as a service under
> linux?
I don't know if that would be the answer.
> Or is this the wrong route to persue, and should I just port my
> perl-based cgis to C code?
mod_perl seems to do a very good job.
# perldoc perlfaq3
/How can I make my CGI script more efficient
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | Advertising: The science of arresting
Commercial Dynamics Pty. Ltd. | the human intelligence long enough to
NSW, Australia | get money from it.
------------------------------
Date: 7 May 1998 01:28:17 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Running script as background program.
Message-Id: <6ir2nh$gfq$4@comdyn.comdyn.com.au>
In article <354EB665.AAFE49BA@uidaho.edu>,
Derek Blandford <blan0416@uidaho.edu> writes:
> I've created a chat written in Perl that uses sockets. The main program
> needs to run continously, meaning I need to be able to shut down telnet
> without it closing the program. I'm not sure if this is a Perl question
> or a Unix question,
It's both, if you plan to write the main program for perl.
> so it's posted in both.
Not to mention that you posted it three times to clpm. Did you know
that you can crosspost to multiple groups at once, so there is
effectively only one copy of your article, with pointers from both
groups?
# perldoc -f fork
# man fork
# perldoc perlipc
> Please reply at least via email....thanks a million.
I've replied at least via Usenet. Is that ok too?
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au |
Commercial Dynamics Pty. Ltd. | Curiouser and curiouser, said Alice.
NSW, Australia |
------------------------------
Date: 7 May 1998 01:23:21 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Sending perl HTML output to diffrent frames
Message-Id: <6ir2e9$gfq$3@comdyn.comdyn.com.au>
In article <894359785.10329.0.nnrp-04.c2de97e4@news.demon.co.uk>,
"Adam Carden" <adam@pacific-artists.demon.co.uk> writes:
> I am writing a search engine however I am unsure how to target the output of
> the script to different frames.
> I do apologise if this is the wrong group as I am not sure where to post
> it(perl, html or cgi?)
It is indeed the wrong group. You should be asking this in one of the
comp.infosystems.www.* groups, where they talk about HTML, frames and
how to implement these things. This perl group talks about perl
specific things, and the answer to your question would be the same, no
matter what your CGI stuff is written in.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | I think I think, therefore I think I
Commercial Dynamics Pty. Ltd. | am.
NSW, Australia |
------------------------------
Date: Wed, 06 May 1998 20:06:43 -0500
From: Frank Meng <frankmeng@usa.net>
Subject: settime
Message-Id: <35510923.45EB@usa.net>
I think I can get the time value out of system like this:
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
(localtime(time))[0..8];
Now I want to have a value for one month ago.
I can write
$mon = $mon - 1;
I want to compare two times. But how can I set it back as a TIME?
--
--------------------------------------
Communicate with others !
http://thunder.prohosting.com/~yunyu/
------------------------------
Date: 7 May 1998 01:20:40 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: stat function
Message-Id: <6ir298$gfq$2@comdyn.comdyn.com.au>
In article <354efd29.0@tmsserv4.tmsnet.co.uk>,
"Mark Austin" <mark@tmsnet.co.uk> writes:
> I've written a routine to get the file size of each file within a specific
> directory.
>
> however, it only works on particular files. There doesn't seem to be a
> pattern either. I'm using NT as a platform.
Odd. It should work at all times or never. What is the code you use?
Maybe you are just missing a pattern which is there?
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | That's not a lie, it's a terminological
Commercial Dynamics Pty. Ltd. | inexactitude.
NSW, Australia |
------------------------------
Date: Thu, 07 May 1998 01:42:43 GMT
From: cjl@c1003798-a.frmt1.sfba.home.com (Charles J. Leslie)
Subject: Strange parsing problem with perl5.004_04
Message-Id: <6ir09d$kde$1@c1003798-a.frmt1.sfba.home.com>
I have compiled perl 5.004_04 for Irix 6.4 and for some strange reason
whenever, I use the '-T -w' switches on the invocation line, I get the
following error:
Unrecognized switch: - -w (-h will show valid options).
My the first line in my script is #!/usr/local/bin/perl -T -w
According to 'perl -h', the switches are valid. Therefore, I tried
different permutations of '-T -w'. Below are my results:
if I use, -Tw without a space after the 'w', perl parses the
switches just fine.
'-Tw ' I get an error
'-T -w' also gets an error
I wasn't able to find any information in the FAQ or on CPAN.
Has anyone came across this problem on an Irix 6.4 system?
Thanks
-charles
------------------------------
Date: 7 May 1998 01:05:12 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: system ("$progname"); does not work. Why?
Message-Id: <6ir1c8$gfq$1@comdyn.comdyn.com.au>
In article <3550A415.AA9DFF62@logica-sa.com>,
amaury <aamblard-ladurantie@logica-sa.com> writes:
> system ('/usr/sbin/htpasswd /home/my_dir/.htpasswd foobar', "mypwd", "mypwd")
> or die "Pb with Htpasswd";
Why do you treat some arguments as part of the command, and some
arguments as arguments? See below.
The return value of system is the exit status of the program. Most
programs return 0 on successful exit. That means you need to test
differently.
> #I checked 10000 times: the patchs are correct
Oh, really?
> $progname = '/usr/bin/htpasswd';
They're NOT the same as above though.
> $filename = '/home/mydir/.htpasswd';
And again, not the same.
You should make up your mind about what the paths should be.
> #so I tried something else
> @args =("$progname $filename $user", "$pass1", "$pass2");
Why the quotes? What is wrong with
@args = ($progname, $filename, $user, $pass1, $pass2);
> system ("@args") or die "Once again, it doe not work";
Why the quotes? Do you realise how a list gets expanded within double
quotes? This may or may not be what you want. Try it, with a print.
Have you actually read the documentation for system? Have you seen the
following parts in there? (Even though I only quote a bit, I strongly
suggest you read all of it, and follow its examples).
# perldoc -f system
[snip]
The return value is the exit status of the program as returned by the
wait() call. To get the actual exit value divide by 256.
[snip]
@args = ("command", "arg1", "arg2");
system(@args) == 0
or die "system @args failed: $?"
[snip]
This is remarkeably unlike what you tried.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | I'm desperately trying to figure out
Commercial Dynamics Pty. Ltd. | why kamikaze pilots wore helmets - Dave
NSW, Australia | Edison
------------------------------
Date: Wed, 6 May 1998 18:01:31 -0700
From: "edepot" <phlin@ix.netcom.com>
Subject: Win95 Perl scripts DONT WORK on UNIX
Message-Id: <6ir18l$flv@dfw-ixnews8.ix.netcom.com>
Hello. I found out that perl scripts written to run
on Windows 95 Perl DOES NOT WORK
on unix Perl.
The reason is that Windows (or DOS) puts a
character "^M" after a line, and UNIX perl
does NOT understand this character.
The only way to fix it is if you have a utility
to STRIP the "^M" characters on the scripts from unix
side after you have ftp'ed them from your
win95 computer. You can
see the characters by editing the file using
vi editor from the UNIX side.
My question is, HOW DO YOU STRIP THE
"^M" character? Is there a perl script that
does this? Is there a /usr/bin program that
I can use to achieve this on many files?
PLEASE EMAIL me responses as well...
phlin@ix.netcom.com
Thanks.
------------------------------
Date: Thu, 07 May 1998 01:21:13 GMT
From: Bill 'Sneex' Jones <webmaster@fccjmail.fccj.org>
Subject: Re: Win95 Perl scripts DONT WORK on UNIX
Message-Id: <35510AC5.75B85B50@fccjmail.fccj.org>
edepot wrote:
>
> My question is, HOW DO YOU STRIP THE
> "^M" character? Is there a perl script that
> does this? Is there a /usr/bin program that
> I can use to achieve this on many files?
How about ftp'ing in ASC mode???
Just a thought, :-)
-Sneex-
____________________________________________________________________________
Bill Jones | FCCJ Webmaster | Voice 1-904-632-3089 | Fax 1-904-632-3007
Florida Community College at Jacksonville | 501 W. State St. | Jax, FL 32202
mailto:webmaster@fccjmail.fccj.org | http://webmaster.fccj.org/Webmaster
------------------------------
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 2522
**************************************