[13931] in Perl-Users-Digest
No subject found in mail header
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 10 17:48:14 1999
Date: Tue, 9 Nov 1999 09:10:20 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <942167420-v9-i1327@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 9 Nov 1999 Volume: 9 Number: 1327
Today's topics:
Re: perl as first language? (Simon Cozens)
Re: perl as first language? lee.lindley@bigfoot.com
Re: perl as first language? (Simon Cozens)
Re: perl as first language? (Abigail)
Perl Extensions. Arrgh. <dgarstan@nsw.bigpond.net.au>
Re: Perl Extensions. Arrgh. (Arved Sandstrom)
Re: Perl/Tk looping question. (Kragen Sitaker)
Re: porting ksh to perl <john.everitt@best.ms.philips.com>
Re: porting ksh to perl <gellyfish@gellyfish.com>
Re: porting ksh to perl <john.everitt@best.ms.philips.com>
Re: porting ksh to perl (Kragen Sitaker)
Re: porting ksh to perl <gellyfish@gellyfish.com>
Re: Problem using Expect.pm arami99@my-deja.com
Re: setting environment variables (Abigail)
Re: setting environment variables (Kragen Sitaker)
Re: Software package for creating dynamic web pages fro <gellyfish@gellyfish.com>
Re: symbolics was [Re: FAQ 5.5: How can I manipulate fi (Bart Lateur)
Re: symbolics was [Re: FAQ 5.5: How can I manipulate fi lee.lindley@bigfoot.com
unix perl v/s win perl <panteranet@entelchile.net>
Re: unix perl v/s win perl <gellyfish@gellyfish.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 9 Nov 1999 14:13:20 GMT
From: simon@othersideofthe.earth.li (Simon Cozens)
Subject: Re: perl as first language?
Message-Id: <slrn82gb00.90o.simon@othersideofthe.earth.li>
Martien Verbruggen (comp.lang.perl.misc):
> Abigail <abigail@delanet.com> wrote:
>> I disagree with Perl, for the same reason I don't recommend C. It's way
>> too messy and there's too much rope. That's great for someone who knows
>> what they are doing, but not good for someone who doesn't. First learn
>> to program, then you know how to exploit the mess and ropes of Perl and C.
Abigail, programming is a class and languages are instances; programming
techniques can be taught well to apply to any given language. An
argument as to why Perl *is* a good first language should be appearing
on www.perl.com RSN, I'm told.
>In general, yes, C and Perl are not the best languages to learn
>programming. But don't forget that the OP was asking for programming
>in the specific context of system administration. Perl and C
>immediately jump up as the two most applicable languages.
I'm not sure this is the case any more; it certainly used to be shell
scripting vs. C (hence the lightbulb joke) until Perl wiggled into the
middle. Out of the two, it seems to be C that lost the ground, though,
rather than shell scripting. It's no longer necessary for a sysadmin to
be an expert C programmer, (read for meaning - I'm not saying a sysadmin
doesn't need to know C. I'm saying you can get by without, if you want
to ignore things like security reviews of incoming applications) but
he's going to be coming back to Perl and shell again and again, whether
to do the admin work himself, or in bits and pieces other people have
written.
As such, I don't think it's fair to lump C and Perl in the same
category; the learning curves, the style, the objectives and the
usability are very different between the two languages. If you don't
believe me, it might be that you're writing Perl like you would C...?
--
"Even more amazing was the realization that God has Internet access. I
wonder if He has a full newsfeed?"
(By Matt Welsh)
------------------------------
Date: 9 Nov 1999 15:41:55 GMT
From: lee.lindley@bigfoot.com
Subject: Re: perl as first language?
Message-Id: <809fc3$1pl$1@rguxd.viasystems.com>
Simon Cozens <simon@othersideofthe.earth.li> wrote:
:>> Abigail <abigail@delanet.com> wrote:
:> If you don't
:>believe me, it might be that you're writing Perl like you would C...?
I spewed coffee. Luckily it went back into the cup (mostly).
--
// Lee.Lindley /// I used to think that being right was everything.
// @bigfoot.com /// Then I matured into the realization that getting
//////////////////// along was more important. Except on usenet.
------------------------------
Date: 9 Nov 1999 15:46:59 GMT
From: simon@othersideofthe.earth.li (Simon Cozens)
Subject: Re: perl as first language?
Message-Id: <slrn82ggfj.90o.simon@othersideofthe.earth.li>
lee.lindley@bigfoot.com (comp.lang.perl.misc):
>:>> Abigail <abigail@delanet.com> wrote:
>:> If you don't
>:>believe me, it might be that you're writing Perl like you would C...?
>
>I spewed coffee. Luckily it went back into the cup (mostly).
Woo, woo, woo. Wait one. That wasn't a reply to Abigail's post. Count
the >'s. Besides, it was general comments, anyway.
--
"I will make no bargains with terrorist hardware."
-- Peter da Silva
------------------------------
Date: 9 Nov 1999 10:23:24 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: perl as first language?
Message-Id: <slrn82giqf.6es.abigail@alexandra.delanet.com>
Simon Cozens (simon@othersideofthe.earth.li) wrote on MMCCLXI September
MCMXCIII in <URL:news:slrn82gb00.90o.simon@othersideofthe.earth.li>:
{} Martien Verbruggen (comp.lang.perl.misc):
{} > Abigail <abigail@delanet.com> wrote:
{} >> I disagree with Perl, for the same reason I don't recommend C. It's way
{} >> too messy and there's too much rope. That's great for someone who knows
{} >> what they are doing, but not good for someone who doesn't. First learn
{} >> to program, then you know how to exploit the mess and ropes of Perl and C.
{}
{} Abigail, programming is a class and languages are instances; programming
{} techniques can be taught well to apply to any given language.
Probably. I still think that a 747 or an F16 aren't the ideal platforms to
learn flying in, even if well taught flying lessons apply to all planes.
Abigail
--
$_ = "\x3C\x3C\x45\x4F\x54\n" and s/<<EOT/<<EOT/ee and print;
"Just another Perl Hacker"
EOT
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Tue, 09 Nov 1999 10:53:26 GMT
From: "Douglas Garstang" <dgarstan@nsw.bigpond.net.au>
Subject: Perl Extensions. Arrgh.
Message-Id: <G2TV3.32729$pf4.29675@news-server.bigpond.net.au>
Anyone,
I'm looking for some documentation on writing perl extensions.
The perlxstut and perlxs man pages are, lets say, pretty slim on details. A
web search on:
+perl +xs +guide +CODE +RETVAL -perltoc
returns 9 matches, and most of THOSE are man pages anyway.
With the 1400+ modules on CPAN, a large number of which would be written
with the use of extensions, surely there must be some decent documentation
somewhere (and don't say perl.com, because the documentation there is just
verbatim copies of the man pages).
... I must really be doing something wrong, because:
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
MODULE = Mytest2 PACKAGE = Mytest2
void
foo()
CODE:
RETVAL = 5;
failes on a make with:
Mytest2.xs: In function `XS_Mytest2_foo':
Mytest2.xs:11: `RETVAL' undeclared (first use in this function)
Mytest2.xs:11: (Each undeclared identifier is reported only once
Mytest2.xs:11: for each function it appears in.)
make: *** [Mytest2.o] Error 1
Regards
Douglas.
------------------------------
Date: Tue, 09 Nov 1999 07:14:21 -0400
From: Arved_37@chebucto.ns.ca (Arved Sandstrom)
Subject: Re: Perl Extensions. Arrgh.
Message-Id: <Arved_37-0911990714210001@dyip-26.chebucto.ns.ca>
In article <G2TV3.32729$pf4.29675@news-server.bigpond.net.au>, "Douglas
Garstang" <dgarstan@nsw.bigpond.net.au> wrote:
> ... I must really be doing something wrong, because:
> #include "EXTERN.h"
> #include "perl.h"
> #include "XSUB.h"
>
> MODULE = Mytest2 PACKAGE = Mytest2
>
> void
> foo()
> CODE:
> RETVAL = 5;
>
> failes on a make with:
>
> Mytest2.xs: In function `XS_Mytest2_foo':
> Mytest2.xs:11: `RETVAL' undeclared (first use in this function)
> Mytest2.xs:11: (Each undeclared identifier is reported only once
> Mytest2.xs:11: for each function it appears in.)
> make: *** [Mytest2.o] Error 1
>
And indeed you are - the return type of foo() is declared as void, but you
are setting RETVAL nonetheless. Change void to int and see how that goes.
Arved Sandstrom
------------------------------
Date: Tue, 09 Nov 1999 15:52:47 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Perl/Tk looping question.
Message-Id: <jrXV3.60629$23.2335916@typ11.nn.bcandid.com>
In article <ruJV3.6223$L5.68611@c01read02-admin.service.talkway.com>,
joneill <joneill@pgicompanies.com> wrote:
>In Perl/Tk how can I get access to objects(pressing Cancel buttons,
>redrawing progress bars, etc.) while my program is in a loop (reading a
>file, generating a table, etc.) without totally compromising my
>program's performance?
Pass a continuation of the loop to after() or run the whole thing from
repeat(). You don't need to do this every iteration of the loop; just
figure out how many iterations it takes to use up 100ms or so, and do
that many all at once.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Tue, 9 Nov 1999 09:54:46 +0100
From: "John Everitt" <john.everitt@best.ms.philips.com>
Subject: Re: porting ksh to perl
Message-Id: <942159472.794186@mmisg1.best.ms.philips.com>
Jonathan,
Thanks for the reply, however, I'm looking to run the existing scripts on a
machine, i.e. Windows NT, that does not have the korn shell installed.
Obviously the best idea would be to rewrite the scripts but currently we do
not have the available resources and as a stop gap measure I was hoping
there was a quick and dirty ksh to perl translation utility in order to buy
us some time. Maybe not ...
The other alternative is a ksh emulator for Windows but I've tried UWIN and
performance is not good ...
Any other ideas ?
John
Jonathan Stowe <gellyfish@gellyfish.com> wrote in message
news:807h4o$fjh$1@gellyfish.btinternet.com...
> On Mon, 8 Nov 1999 09:38:35 +0100 John Everitt wrote:
> > We currently have a number of ksh scripts that we would like to port to
perl
> > and I was wondering whether anybody knew of any automated methods for
doing
> > this conversion.
> >
>
> #!/usr/bin/perl -w
>
> use strict;
>
> my $kscript = do { local $/; <> };
>
> print <<EOOUT;
> #!/usr/bin/perl -w
>
> use strict;
>
> my \$blah =<<`EOKSH`;
> $kscript
> EOKSH
> EOOUT
>
>
> HTH
>
> /J\
> --
> Jonathan Stowe <jns@gellyfish.com>
> <http://www.gellyfish.com>
> Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 9 Nov 1999 09:12:20 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: porting ksh to perl
Message-Id: <3827e574_2@newsread3.dircon.co.uk>
John Everitt <john.everitt@best.ms.philips.com> wrote:
>
> Thanks for the reply, however, I'm looking to run the existing scripts on a
> machine, i.e. Windows NT, that does not have the korn shell installed.
>
I had left the smiley out ....
/J\
--
"We've even been asked to review a luxury hotel. I can't think why" -
Neil Hamilton
------------------------------
Date: Tue, 9 Nov 1999 16:15:27 +0100
From: "John Everitt" <john.everitt@best.ms.philips.com>
Subject: Re: porting ksh to perl
Message-Id: <942182313.189183@mmisg1.best.ms.philips.com>
Ahhh... ! It all becomes clear ....
Jonathan Stowe <gellyfish@gellyfish.com> wrote in message
news:3827e574_2@newsread3.dircon.co.uk...
> John Everitt <john.everitt@best.ms.philips.com> wrote:
> >
> > Thanks for the reply, however, I'm looking to run the existing scripts
on a
> > machine, i.e. Windows NT, that does not have the korn shell installed.
> >
>
> I had left the smiley out ....
>
>
> /J\
> --
> "We've even been asked to review a luxury hotel. I can't think why" -
> Neil Hamilton
------------------------------
Date: Tue, 09 Nov 1999 16:34:24 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: porting ksh to perl
Message-Id: <k2YV3.60909$23.2341433@typ11.nn.bcandid.com>
In article <942159472.794186@mmisg1.best.ms.philips.com>,
John Everitt <john.everitt@best.ms.philips.com> wrote:
>Thanks for the reply, however, I'm looking to run the existing scripts on a
>machine, i.e. Windows NT, that does not have the korn shell installed.
>Obviously the best idea would be to rewrite the scripts but currently we do
>not have the available resources and as a stop gap measure I was hoping
>there was a quick and dirty ksh to perl translation utility in order to buy
>us some time. Maybe not ...
>
>The other alternative is a ksh emulator for Windows but I've tried UWIN and
>performance is not good ...
How about bash, pdksh, or zsh? I know at least bash runs under
Cygwin. Performance is not good statting files from within Cygwin, but
perhaps that is not what you ran into with UWIN.
The http://language.perl.com/ppt/ guys are planning to write a Bourne
shell in Perl, but I don't think they have yet.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: 9 Nov 1999 16:46:49 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: porting ksh to perl
Message-Id: <38284ff9_1@newsread3.dircon.co.uk>
Kragen Sitaker <kragen@dnaco.net> wrote:
> In article <942159472.794186@mmisg1.best.ms.philips.com>,
> John Everitt <john.everitt@best.ms.philips.com> wrote:
>>Thanks for the reply, however, I'm looking to run the existing scripts on a
>>machine, i.e. Windows NT, that does not have the korn shell installed.
>>Obviously the best idea would be to rewrite the scripts but currently we do
>>not have the available resources and as a stop gap measure I was hoping
>>there was a quick and dirty ksh to perl translation utility in order to buy
>>us some time. Maybe not ...
>>
>>The other alternative is a ksh emulator for Windows but I've tried UWIN and
>>performance is not good ...
>
> How about bash, pdksh, or zsh? I know at least bash runs under
> Cygwin. Performance is not good statting files from within Cygwin, but
> perhaps that is not what you ran into with UWIN.
>
The djgpp bash is what I use - <http://www.delorie.com>
/J\
--
"I can't believe Elton John recorded that song again. Exactly how do you
live your life like a spurgis in the wind?" - Ronnie, Veronica's Closet
------------------------------
Date: Tue, 09 Nov 1999 16:29:18 GMT
From: arami99@my-deja.com
Subject: Re: Problem using Expect.pm
Message-Id: <809i4n$3lo$1@nnrp1.deja.com>
?
In article <806dfg$psk$1@nnrp1.deja.com>,
William <willmurat@my-deja.com> wrote:
> Thaks for the help! I'm just a newbie in Perl
and your advices will help
> me.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 9 Nov 1999 02:47:39 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: setting environment variables
Message-Id: <slrn82fo3u.6es.abigail@alexandra.delanet.com>
Balaji Krishnamurthy (bakrishn@cisco.com) wrote on MMCCLXI September
MCMXCIII in <URL:news:38278112.824EC06A@cisco.com>:
|| hi,
|| how do i set environment variables in perl. i need to write a script
|| which would set some environment variables for both unix and win-nt.
||
|| i presume the setenv does not reflect the settings to the parent
|| shell.
No. RTFFAQ.
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Tue, 09 Nov 1999 16:07:30 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: setting environment variables
Message-Id: <6FXV3.60647$23.2338384@typ11.nn.bcandid.com>
In article <kusvh7cmc0p.fsf@bottom.bu.edu>,
Scott Lanning <slanning@bu.edu> wrote:
> $ENV{PATH} = '/bin:/sbin:/usr/bin:/usr/sbin:.'
>
>There's also an "Env" module in the standard library, but I'm
>not sure why one would ever use it.
The Env module brings environment variables into your normal variable
namespace. This is sometimes more convenient.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: 9 Nov 1999 10:02:53 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Software package for creating dynamic web pages from multiple data sources
Message-Id: <3827f14d_2@newsread3.dircon.co.uk>
Phoenixl <phoenixl@aol.com> wrote:
> I've developed a software package which allows a developer to create web pages
> incorporating
> data from one or more data sources, e.g. database, XML objects, other web
> sites, etc, or dynamically generated data. The pages can be
> automatically constructed according user needs or preferences, e.g.
> layout, language, disability accomodations, information requirements, etc.
>
> More information is at:
>
> http://members.aol.com/phoenixl/template-processor
>
But its in Java ! Why on earth do you think that we would be interested in
it ...
/J\
--
"I suggest you apply some lubrication before any bending begins" -
Antoine de Caunes, Eurotrash
------------------------------
Date: Tue, 09 Nov 1999 12:53:29 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: symbolics was [Re: FAQ 5.5: How can I manipulate fixed-record-length files?]
Message-Id: <382a18dd.1369115@news.skynet.be>
lee.lindley@bigfoot.com wrote:
>Can anyone list a "good" time to use symbolic references in Perl 5
>for some better definition of good than the above example? I have a
>feeling that there really is a time to use them, but I can't think of
>any off of the top of my head.
You "need" them to import stuff from one package to another.
Actually, you don't. :-) Direct stash manipulation works just as well,
except with "use strict" which still doesn't recognize the "imported"
variables.
--
Bart.
------------------------------
Date: 9 Nov 1999 15:59:39 GMT
From: lee.lindley@bigfoot.com
Subject: Re: symbolics was [Re: FAQ 5.5: How can I manipulate fixed-record-length files?]
Message-Id: <809gdb$2a4$1@rguxd.viasystems.com>
Bart Lateur <bart.lateur@skynet.be> wrote:
[snip paragraph showing them eq symbolic references]
:>You "need" them to import stuff from one package to another.
They may be used under the hood, but I still don't have to see
them in my programs. "Exporter" takes care of it
for me.
I liked uri's answer. I don't need them. If I do ever need them,
I'll know it when I get there.
--
// Lee.Lindley /// I used to think that being right was everything.
// @bigfoot.com /// Then I matured into the realization that getting
//////////////////// along was more important. Except on usenet.
------------------------------
Date: Tue, 9 Nov 1999 12:43:58 -0400
From: "=®Pantera©=" <panteranet@entelchile.net>
Subject: unix perl v/s win perl
Message-Id: <0iXV3.1344$Wg2.35807@maule>
Only one question..
Is the win version of perl the same that the unix version?!??!
what's the diference!??
solo una pregunta..
es la version de perl para win la misma que la version de unix!?!!?
cual es la diferencia!?!?
=®Pantera©=
------------------------------
Date: 9 Nov 1999 16:07:12 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: unix perl v/s win perl
Message-Id: <382846b0_1@newsread3.dircon.co.uk>
=®Pantera©= <panteranet@entelchile.net> wrote:
> Only one question..
> Is the win version of perl the same that the unix version?!??!
It is the same version.
Read the the perlport manpage for port specific differences.
/J\
--
"I sign my paintings Vincent because people can't pronounce Van Gough"
- Vincent Van Gough
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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.
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 V9 Issue 1327
**************************************