[16033] in Perl-Users-Digest
Perl-Users Digest, Issue: 3445 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 21 18:05:34 2000
Date: Wed, 21 Jun 2000 15:05:19 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <961625118-v9-i3445@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 21 Jun 2000 Volume: 9 Number: 3445
Today's topics:
[OT] Programming languages. (Sebastian Marius Kirsch)
Re: A Computer Programmers Profile <russ_jones@rac.ray.com>
And now, The Forehead Smack... (Mark Badolato)
Any website on Perl programming? <rossxu@127.0.0.1>
Re: Any website on Perl programming? <rob13@rock13.com>
Re: Any website on Perl programming? <rootbeer@redcat.com>
Re: Any website on Perl programming? <cplee@bigfoot.com>
Re: Any website on Perl programming? <red_orc@my-deja.com>
Re: Building perl 5.6 on Linux Mandrake <jboes@eoexchange.com>
Re: Consistently getting "(in cleanup) Can't call metho <rootbeer@redcat.com>
Re: creating a file that doesn't exist <rootbeer@redcat.com>
date ? <NOpcoa@SPAMesatclear.iePlease>
Re: date ? <rootbeer@redcat.com>
help on perl format function <ldk006@email.mot.com>
Re: help on perl format function <care227@attglobal.net>
Re: I need to get better at Perl <flavell@mail.cern.ch>
Re: I need to get better at Perl <flavell@mail.cern.ch>
Re: I need to get better at Perl (Tad McClellan)
Re: LWP and HTTPS fail <rootbeer@redcat.com>
Re: Need Help (Tad McClellan)
Number or string item in an array? <rossxu@127.0.0.1>
Re: Number or string item in an array? <rootbeer@redcat.com>
Re: Number or string item in an array? (Tad McClellan)
Passing filehandles to subroutines (Mike)
Re: Passing filehandles to subroutines (Andrew E Page)
Re: Passing filehandles to subroutines (Tad McClellan)
Re: Passing filehandles to subroutines (Tad McClellan)
Perl 5.6 says 'syntax error', Perl 5.005_03 does not <jboes@eoexchange.com>
Re: Perl 5.6 says 'syntax error', Perl 5.005_03 does no <rootbeer@redcat.com>
Re: Perl Builder 2.0 for LINUX - Beta Available sty2999@my-deja.com
Re: Perl Builder 2.0 for LINUX - Beta Available <marty@solutionsoft.com>
Re: Perl Builder 2.0 for LINUX - Beta Available <marty@solutionsoft.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 21 Jun 2000 20:45:13 +0200
From: skirsch@moebius.inka.de (Sebastian Marius Kirsch)
Subject: [OT] Programming languages.
Message-Id: <8ir2fp$45l$1@moebius.priv>
Dan Sugalski schreibt:
> PDF is a subset of PostScript.
No. Actually, PDF is something completely apart from PostScript that
happens to share part of the syntax and some of the data structures with
PostScript.
PDF lacks all the things that make PostScript a programming language,
ie. conditionals, looping constructs, arithmetical operators etc.
> I don't think the raytracers written in PostScript will translate to
> something Acrobat will read,
They won't translate to a raytracing program, but you can convert them
to PDF, which will be a kind of "snapshot" of the output of the
PostScript program.
--
Yours, Sebastian Kirsch <skirsch@moebius.inka.de>
Um ein tadelloses Mitglied einer Schafherde sein zu können, muß man vor
allem ein Schaf sein. -- Albert Einstein
------------------------------
Date: Wed, 21 Jun 2000 15:43:53 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: A Computer Programmers Profile
Message-Id: <39512909.2979466E@rac.ray.com>
Drew Simonis wrote:
>
> Russ Jones wrote:
> >
> > > Killing your children is oft accomplished in Perl.
> >
> > How about killing my neighbor's children?
> >
>
> I prefer heavy blunt objects for such things.
Ah. COBOL.
--
Russ Jones - HP OpenView IT/Operatons support
Raytheon Aircraft Company, Wichita KS
russ_jones@rac.ray.com 316-676-0747
Quae narravi, nullo modo negabo. - Catullus
------------------------------
Date: 21 Jun 2000 21:46:17 GMT
From: mbadolato@cybernox.com (Mark Badolato)
Subject: And now, The Forehead Smack...
Message-Id: <8F5A91AEEmbadolatoquepasacom@206.165.3.70>
The company I work for asked each of us developers to submit a little
bio of ourselves for an internal departmental thing.
In the bio I submitted, I included [to the effect of] "Started working
with Perl in 1996 when a friend needed some help with some scripts for
his web site. I then moved on to working with a couple of commercial
Perl scripts, when they were in thier infancy. I was the first to do
some modifications, enhancemnts, and add-ons for these scripts (some of
the add-ons made it into later versions of the software.)..." etc.
The submitted bios were edited, reworded, reduced etc, by someone who
apparently Just Doesn't Get It. Today we were sent the bio sheet to
review for mistakes etc. Mine contained this edited-down gem:
"He was the first one to create and release modifications and
enhancements on Perl scripts."
Wow. Apparently I'm a pioneer. Just out of curiosity, what the hell
were you guys doing between 1987 and 1996? Just leaving scripts as-is,
or writing completely new ones?? Sheesh.... =8-)
Needless to say, I made sure to submit corrections before catching crap
from my co-workers. =)
--Mark
------------------------------
Date: Wed, 21 Jun 2000 14:39:13 -0400
From: "Ross Xu" <rossxu@127.0.0.1>
Subject: Any website on Perl programming?
Message-Id: <GY745.13222$qS3.34336@tor-nn1.netcom.ca>
Dear there,
I have no book on Perl programming on hand. So I want to learn from some web
site on it (except that perl FAQ).
Could you please tell me where it is?
Thank you in advance.
Ross
------------------------------
Date: Wed, 21 Jun 2000 15:52:48 -0400
From: "Rob - Rock13.com" <rob13@rock13.com>
Subject: Re: Any website on Perl programming?
Message-Id: <39511D10.1AC7500B@rock13.com>
Ross Xu wrote:
>
> Dear there,
> I have no book on Perl programming on hand. So I want to learn from some web
> site on it (except that perl FAQ).
> Could you please tell me where it is?
> Thank you in advance.
> Ross
There are numerous sites that discuss Perl, particularly as it relates
to CGI. Just do a search on Google. Though having at least a reference
book such as Programming Perl can be a big help.
--
Rob
http://rock13.com/webhelp/
Fight Spam - http://www.cauce.org/
------------------------------
Date: Wed, 21 Jun 2000 13:04:39 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Any website on Perl programming?
Message-Id: <Pine.GSO.4.10.10006211304120.4312-100000@user2.teleport.com>
On Wed, 21 Jun 2000, Ross Xu wrote:
> I have no book on Perl programming on hand. So I want to learn from some web
> site on it (except that perl FAQ).
> Could you please tell me where it is?
What search engine did you use which failed to find information on Perl?
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 21 Jun 2000 13:02:36 -0700
From: ChungpingLi <cplee@bigfoot.com>
Subject: Re: Any website on Perl programming?
Message-Id: <39511F5B.F4889164@bigfoot.com>
http://www/webreview.com
Ross Xu wrote:
> Dear there,
> I have no book on Perl programming on hand. So I want to learn from some web
> site on it (except that perl FAQ).
> Could you please tell me where it is?
> Thank you in advance.
> Ross
--
A. R. Tech Communication
6814 S. Parker Rd. Foxfield CO 80016
U.S.A. Tel (888)308-9898 Fax (888)860-7594
Andy@bigfoot.com
------------------------------
Date: Wed, 21 Jun 2000 20:43:29 GMT
From: Rodney Engdahl <red_orc@my-deja.com>
Subject: Re: Any website on Perl programming?
Message-Id: <8ir9dc$ohd$1@nnrp1.deja.com>
In article <GY745.13222$qS3.34336@tor-nn1.netcom.ca>,
"Ross Xu" <rossxu@127.0.0.1> wrote:
> Dear there,
> I have no book on Perl programming on hand. So I want to learn from
some web
> site on it (except that perl FAQ).
> Could you please tell me where it is?
> Thank you in advance.
> Ross
>
>
www.cpan.org
www.perl.com
www.perlmongers.org
www.tpj.com
www.perlarchive.com
seasoned-software.com/perl/
you can find more simply by using "perl" as the keyword in almost any
search engine . . .
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 21 Jun 2000 15:43:51 -0400
From: Jeff Boes <jboes@eoexchange.com>
Subject: Re: Building perl 5.6 on Linux Mandrake
Message-Id: <39511c6d$0$1505$44a10c7e@news.net-link.net>
Jeff Boes wrote:
> Making DynaLoader (static)
> ext/util/make_ext: cd: ext/DynaLoader: No such file or directory
> make[160]: Entering directory `/home/jboes/perl-5.6.0'
> make[160]: `config' is up to date.
> make[160]: Leaving directory `/home/jboes/perl-5.6.0'
> make[160]: Entering directory `/home/jboes/perl-5.6.0'
> AutoSplitting perl library
> ./miniperl -Ilib -e 'use AutoSplit; \
> autosplit_lib_modules(@ARGV)' lib/*.pm lib/*/*.pm
>
> over and over until it finally dies with 'too many open files'.
>
Thanks to another respondent, I was able to track this down: I had
CDPATH="/home/jboes"
and I should have had
CDPATH=".:/home/jboes"
<<<<thud>>>> (sound of head hitting wall)
--
Jeff Boes |perl -e 'print map(substr(" |jboes@eoexhange.com
Sr. S/W Engineer |acehjklnoprstu,\n",$i+=$_,1),(5,9,|616-381-9889 ext 18
Change Technology|-2,1,-13,1,7,1,4,-9,-1,8,-11,10,-7|616-381-4823 fax
EoExchange, Inc. |,8,-4,-7,4,-3,1,4,-3,8,4,1));' |www.eoexchange.com
------------------------------
Date: Wed, 21 Jun 2000 14:26:58 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Consistently getting "(in cleanup) Can't call method "FETCH" ...
Message-Id: <Pine.GSO.4.10.10006211423130.4312-100000@user2.teleport.com>
On Wed, 21 Jun 2000, [iso-8859-1] Thorbjørn Ravn Andersen wrote:
> I have written a small database loader with XML::Parser, GetOpt::Long,
> Benchmark, DBI and DBD:Oracle under the ActiveState version of Perl 5.6
> which works satisfactory, but consistently reports
>
> (in cleanup) Can't call method "FETCH" on an undefined value at
> C:/Perl/site/lib/Win32/TieRegistry.pm line 1486 during global
> destruction.
>
> at the end of each execution.
That sounds as if someone goofed in making at least one of those modules.
I'd _guess_ that someone's DESTROY is wiping out something that another
one of those modules needs. But it could be a bug in perl itself, or in
your own code.
You may be able to use the debugger to find out which variable it is that
became undefined, then run again to try to find whose code is doing that.
Good luck with it!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 21 Jun 2000 12:33:16 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: creating a file that doesn't exist
Message-Id: <Pine.GSO.4.10.10006211232420.4312-100000@user2.teleport.com>
On Wed, 21 Jun 2000, it was written:
> open(FILE, ">nonexistant file") unless -e nonexistant.file
There's a concurrency problem there. Between the time that you check for
existence and the moment of creation, the file may be created. The OP's
code (from the FAQ) avoids that problem. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 21 Jun 2000 21:35:18 +0100
From: "Flashlad" <NOpcoa@SPAMesatclear.iePlease>
Subject: date ?
Message-Id: <8ir8vt$h2q$1@fraggle.esatclear.ie>
Hi
How do you get todays day number (as in 21) and concat it into a varible
with other bits of a url
e.g. /blah/blah/(todays date here).html
i can get three vars together like this $first .=$second.=$third
but it doesn't work when I use $mday
Any sugesttions??
Thanks
------------------------------
Date: Wed, 21 Jun 2000 14:22:17 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: date ?
Message-Id: <Pine.GSO.4.10.10006211420280.4312-100000@user2.teleport.com>
On Wed, 21 Jun 2000, Flashlad wrote:
> How do you get todays day number (as in 21) and concat it into a varible
> with other bits of a url
>
> e.g. /blah/blah/(todays date here).html
>
> i can get three vars together like this $first .=$second.=$third
> but it doesn't work when I use $mday
Sounds as if you've gotten $mday from a function whose documentation you
read. :-) But your code for concatenation could use some help: '.=' is
the append operator, '.' is the one for concatenation. See perlop.
If that doesn't solve your problem, you may need to post a small,
stand-alone example of the code you're trying.
Good luck with it!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 21 Jun 2000 16:20:31 -0400
From: David Kowal <ldk006@email.mot.com>
Subject: help on perl format function
Message-Id: <3951238F.49C41A5C@email.mot.com>
I'm relatively new with respect to perl and the formatting of reports.
I currently have a perl script which queries a db for particular fields
and outputs a html report. I'd like to be able to display a graphic
using the perl format function rather than the current text. Can this
be done? If so, please point me to some reference material on the web or
better still some examples if possible.
BTW - Using perl5.003 UNIX
Thanks in advance
DaveK
--
-
*****************************************
David E. Kowal
Software Tools Engineering/Administration
Motorola Internet and Networking Group
LDK006@email.mot.com (508) 261-5649
*****************************************
------------------------------
Date: Wed, 21 Jun 2000 17:03:45 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: help on perl format function
Message-Id: <39512DB1.6FBF591A@attglobal.net>
David Kowal wrote:
>
> I'm relatively new with respect to perl and the formatting of reports.
>
> I currently have a perl script which queries a db for particular fields
> and outputs a html report. I'd like to be able to display a graphic
> using the perl format function rather than the current text. Can this
> be done? If so, please point me to some reference material on the web or
> better still some examples if possible.
>
Have you read the perlform documentation?
$ perldoc perlform
------------------------------
Date: Wed, 21 Jun 2000 20:10:36 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: I need to get better at Perl
Message-Id: <Pine.GHP.4.21.0006212008270.6396-100000@hpplus03.cern.ch>
On Wed, 21 Jun 2000 robb4444@my-deja.com wrote:
> > The problem is that people insist on posting off topic.
>
> This is a miscellanous forum.
Do I detect another applicant for a killfile entry?
Programmers generally need coffee. So why not post your programming
question to rec.food.drink.coffee? "Hence or otherwise deduce...".
------------------------------
Date: Wed, 21 Jun 2000 20:19:28 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: I need to get better at Perl
Message-Id: <Pine.GHP.4.21.0006212011040.6396-100000@hpplus03.cern.ch>
On 21 Jun 2000, Mike Coffin wrote:
> You reinforce my original point: this newsgroup isn't a good place
> for Perl beginners to get help.
I disagree. It helps them to find the documentation which they
already have but don't yet seem to have been found. That's MUCH more
useful to them than one-off answers composed on the hoof.
> Excepting a very few people, they
> will get only one answer: RTFM. This is usually good advice, but you
> don't need an entire newsgroup to learn that.
Then stop them (if you can) from using an entire newsgroup for asking
questions to which they already have the answers in their Perl
installation kit.
> Like I said, they're better off buying a few good books
yes, if they want to
> and ignoring the newsgroup.
Not necessarily. Lurking is highly recommended. After all, you
say the problem is all those frequently asked questions. So you just
have to sit quietly and watch the frequent answers flying past.
------------------------------
Date: Wed, 21 Jun 2000 13:31:55 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: I need to get better at Perl
Message-Id: <slrn8l22gr.116.tadmc@maxim.metronet.com>
On Wed, 21 Jun 2000 17:19:50 GMT, robb4444@my-deja.com
<robb4444@my-deja.com> wrote:
>
>> The problem is that people insist on posting off topic.
>
>This is a miscellanous forum.
comp
this is a forum about computers
comp.lang
this is a forum about computer languages
comp.lang.perl
this is a forum about the Perl computer language
comp.lang.perl.misc
this is a forum about miscellaneous things relating to the
Perl computer language
"miscellaneous" here does not mean "any damn thing you want".
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 21 Jun 2000 14:30:47 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: LWP and HTTPS fail
Message-Id: <Pine.GSO.4.10.10006211428310.4312-100000@user2.teleport.com>
On Wed, 21 Jun 2000, JOW wrote:
> But i cant make the connection, because I get this error:
>
> 500 Can't connect to secure.incab.se:443 (Bad file number)
It would perhaps help if you can determine who is saying "Bad file
number". Is it the remote machine, or the one you're using LWP on? But all
that we can be sure of is that the transaction failed. If you can track
the transaction, then armed with the protocol spec, you should be able to
see where it breaks down. Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 21 Jun 2000 13:32:57 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Need Help
Message-Id: <slrn8l22ip.116.tadmc@maxim.metronet.com>
On Wed, 21 Jun 2000 08:04:33 -0400, Dean Q. Tran <deqtran@hns.com> wrote:
> Subject: Need Help
Need subject in Subject:
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 21 Jun 2000 14:31:13 -0400
From: "Ross Xu" <rossxu@127.0.0.1>
Subject: Number or string item in an array?
Message-Id: <aR745.13218$qS3.34027@tor-nn1.netcom.ca>
Dear there,
Could you please tell me how I can know which items are number, and which
are strings in an array(e.g. @array)?
Thank you in advance.
Ross
------------------------------
Date: Wed, 21 Jun 2000 13:03:49 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Number or string item in an array?
Message-Id: <Pine.GSO.4.10.10006211301590.4312-100000@user2.teleport.com>
On Wed, 21 Jun 2000, Ross Xu wrote:
> Could you please tell me how I can know which items are number, and
> which are strings in an array(e.g. @array)?
Have you seen what the FAQ has to say about this in section four? Look for
the question "How do I determine whether a scalar is a
number/whole/integer/float?" and remember that each item in the array is
an independent scalar value. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 21 Jun 2000 13:55:09 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Number or string item in an array?
Message-Id: <slrn8l23sd.136.tadmc@maxim.metronet.com>
On Wed, 21 Jun 2000 14:31:13 -0400, Ross Xu <rossxu@127.0.0.1> wrote:
>Could you please tell me how I can know which items are number, and which
>are strings in an array(e.g. @array)?
Could you please tell us what you mean when you say "number"?
1.0e10 looks like a number. looks like a string.
123 looks like a number. looks like a string.
You don't _need_ to know.
Why do you think you need to know this?
You said in another post that you don't like the FAQs.
You cannot post to the Perl newsgroup without first checking
the Perl FAQs!
perldoc -q number
"How do I determine whether a scalar is a number/whole/integer/float?"
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 21 Jun 2000 12:24:46 -0700
From: tcsh@holly.colostate.edu (Mike)
Subject: Passing filehandles to subroutines
Message-Id: <slrn8l223e.b4e.tcsh@faure.cs.colostate.edu>
Hello,
I'd like to pass a filehandle to a sub. I'm having difficulties figuring
out the correct syntax. Below is the code I'm working with,
Any thoughts are appreciated,
Mike
#!/usr/local/bin/perl -w
use strict;
package main;
opendir(CUR_DIR, "./");
sub one_lev_dir {
my $mydir = $_[0];
# works with $$mydir replaced with CUR_DIR
return { waters=>[readdir("$$mydir"), 5+15*2, "$lll::sickness"],
sykes=>{bob=>"roosevelt"} };
}
package lll;
$lll::sickness = "you have the sickness $! $0 $% $\ $. $/ $^ *";
# this is the problem call
my $hash_ref=&main::one_lev_dir(main::CUR_DIR);
print "@{$hash_ref->{'waters'}}";
print "$hash_ref->{'sykes'}{'bob'}";
------------------------------
Date: Wed, 21 Jun 2000 19:21:04 GMT
From: aep@world.std.com (Andrew E Page)
Subject: Re: Passing filehandles to subroutines
Message-Id: <FwIr34.7xz@world.std.com>
Try using a DirHandle object instead of a typeglob:
use DirHandle ;
my($curDir) ;
$curDir = new DirHandle("./") ;
In article <slrn8l223e.b4e.tcsh@faure.cs.colostate.edu>,
Mike <tcsh@holly.colostate.edu> wrote:
>Hello,
>
>I'd like to pass a filehandle to a sub. I'm having difficulties figuring
>out the correct syntax. Below is the code I'm working with,
>
>Any thoughts are appreciated,
>Mike
>
>#!/usr/local/bin/perl -w
>
>use strict;
>package main;
>
>opendir(CUR_DIR, "./");
>sub one_lev_dir {
> my $mydir = $_[0];
> # works with $$mydir replaced with CUR_DIR
> return { waters=>[readdir("$$mydir"), 5+15*2, "$lll::sickness"],
> sykes=>{bob=>"roosevelt"} };
>}
>
>package lll;
>$lll::sickness = "you have the sickness $! $0 $% $\ $. $/ $^ *";
>
># this is the problem call
>my $hash_ref=&main::one_lev_dir(main::CUR_DIR);
>
>print "@{$hash_ref->{'waters'}}";
>print "$hash_ref->{'sykes'}{'bob'}";
--
Andrew E. Page (Warrior Poet) | Decision and Effort The Archer and Arrow
Software Engineering Consultant | The difference between what we are
Unix, Mac, C/C++/Java, Perl, NT | and what we want to be.
------------------------------
Date: Wed, 21 Jun 2000 13:57:31 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Passing filehandles to subroutines
Message-Id: <slrn8l240r.136.tadmc@maxim.metronet.com>
On 21 Jun 2000 12:24:46 -0700, Mike <tcsh@holly.colostate.edu> wrote:
>I'd like to pass a filehandle to a sub.
A whole lot of people would like to do that.
So many if fact that that Question is Asked Frequently.
perldoc -q filehandle
"How can I make a filehandle local to a subroutine?
How do I pass filehandles between subroutines?
How do I make an array of filehandles?"
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 21 Jun 2000 14:00:02 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Passing filehandles to subroutines
Message-Id: <slrn8l245i.136.tadmc@maxim.metronet.com>
On 21 Jun 2000 12:24:46 -0700, Mike <tcsh@holly.colostate.edu> wrote:
>I'd like to pass a filehandle to a sub.
^^^^^^^^^^
>opendir(CUR_DIR, "./");
That is not a filehandle.
That is a dirhandle.
You should check the return value. Just because you asked for
something does not imply that you got it:
opendir(CUR_DIR, '.') || die "could not open cwd $!";
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 21 Jun 2000 16:00:16 -0400
From: Jeff Boes <jboes@eoexchange.com>
Subject: Perl 5.6 says 'syntax error', Perl 5.005_03 does not
Message-Id: <3951211a$0$1496$44a10c7e@news.net-link.net>
I came across this problem in a bit of Perl code found on my Mandrake
distribution. I wonder if anyone would care to comment:
---start of code snippet---
sub gtkpack($@) {
my $box = shift;
gtkpack_($box, map { 1, $_} @_);
}
---end---
This little bit of code compiles cleanly under perl 5.005_03, but not
under 5.6.0, where it flags the '} @_' area as containing a syntax
error.
(How I stumbled across this:
o Started with a clean Linux workstation with Mandrake 7.0 installed.
o Upgraded Perl to 5.6.
o Suddenly some of my Mandrake utilities start pitching errors.
o Eventually had to clobber the whole workstation, reinstall OS from
scratch, and ...
o ... finally worked up nerve to try it again, but this time installed
5.6.0 into
a separate path.
It's a truly scary feeling when you break your OS by upgrading a
language interpreter...)
--
Jeff Boes |perl -e 'print map(substr(" |jboes@eoexhange.com
Sr. S/W Engineer |acehjklnoprstu,\n",$i+=$_,1),(5,9,|616-381-9889 ext 18
Change Technology|-2,1,-13,1,7,1,4,-9,-1,8,-11,10,-7|616-381-4823 fax
EoExchange, Inc. |,8,-4,-7,4,-3,1,4,-3,8,4,1));' |www.eoexchange.com
------------------------------
Date: Wed, 21 Jun 2000 13:37:30 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Perl 5.6 says 'syntax error', Perl 5.005_03 does not
Message-Id: <Pine.GSO.4.10.10006211333240.4312-100000@user2.teleport.com>
On Wed, 21 Jun 2000, Jeff Boes wrote:
> I came across this problem in a bit of Perl code found on my Mandrake
> distribution. I wonder if anyone would care to comment:
>
> ---start of code snippet---
> sub gtkpack($@) {
> my $box = shift;
> gtkpack_($box, map { 1, $_} @_);
> }
> ---end---
>
> This little bit of code compiles cleanly under perl 5.005_03, but not
> under 5.6.0, where it flags the '} @_' area as containing a syntax
> error.
I suspect that the DWIMmer in 5.6.0 is confused and thinks that you want
{ 1, $_ } to be an anonymous hashref. (You don't, do you?) If you put
parens around your list, it'll decide that you want that code to be a
block. (There are other possible fixes, too, but this one seems clear to
me.)
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 21 Jun 2000 19:18:12 GMT
From: sty2999@my-deja.com
Subject: Re: Perl Builder 2.0 for LINUX - Beta Available
Message-Id: <8ir4dd$kn1$1@nnrp1.deja.com>
In article <8ipdcp$frj@junior.apk.net>,
catfood@apk.net (Mark W. Schumann) wrote:
> In article <8ioetu$man$1@nnrp1.deja.com>, <sty2999@my-deja.com>
wrote:
> >Yes, it requires Wine to run as it is compiled under Windows.
However,
> >it is specificially designed for Linux -- certainly not just enabling
> >the Windows version using Wine.
> >
> >Perhaps you could help me understand your objection to the use of
Wine.
> >
> >My understanding is that it runs maybe 10% slower than a native Linux
> >application. Which does not seem a show stopper to me.
> >
> >Obviously it has a Windows look and feel...but then so do lots of
> >native Linux apps, including for example, the Gnome desktop.
>
> I'm not the original griper, but you're missing the point.
>
> If I'm a Perl programmer who uses Linux, and I want to use your Perl
> IDE on Linux, I have to install and configure some completely
unrelated
> bit of software to do it.
>
> We expect installers and perhaps IDEs to require a shell, the usual
> set of scripting tools, and maybe even perl itself. But Linux users
> (nor most Unix users) would not assume that having and using Wine is
> a normal prerequisite to using a Perl IDE.
>
> Tail wagging dog. Cart before horse. That kind of thing.
>
> And Wine itself is so doggone big and complicated that you've just
> about eliminated the possibility that someone might download and
> try the demo on a lark.
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 21 Jun 2000 12:43:02 -0700
From: Marty Ford <marty@solutionsoft.com>
Subject: Re: Perl Builder 2.0 for LINUX - Beta Available
Message-Id: <39511AC6.2866@solutionsoft.com>
Hi,
> I'm not the original griper, but you're missing the point.
>
> If I'm a Perl programmer who uses Linux, and I want to use your Perl
> IDE on Linux, I have to install and configure some completely unrelated
> bit of software to do it.
>
> And Wine itself is so doggone big and complicated that you've just
> about eliminated the possibility that someone might download and
> try the demo on a lark.
I guess I need to clarify....
* The Wine RPM is only 2.8 MB is size.
* Wine is included in the Perl Builder download file (4.8 MB) total.
* We provide a script to install and configure everything. The entire
process takes about 5 minutes.
Thus, we view Wine as supporting files that are installed along with our
application. It is certainly not the case that we are expecting people
to go out and find/install/configure Wine just to install our software.
The only caveat to the above is that you need a recent version of glibc
and so forth for everything to work. However, this is documented clearly
on the download page, so you will know in advance.
Again, if anyone would like actually try the software:
http://www.solutionsoft.com/pb2_linux.htm
Thanks,
Marty Ford
Solutionsoft
------------------------------
Date: Wed, 21 Jun 2000 12:50:02 -0700
From: Marty Ford <marty@solutionsoft.com>
Subject: Re: Perl Builder 2.0 for LINUX - Beta Available
Message-Id: <39511C6A.27BF@solutionsoft.com>
> Does the update still give write access to the files in the directories?
>
Hi,
It provides either write or execute access to individual files but not
both. It provides write access to the directories. Obviously, these are
only the directories specifically created for our program...we don't
change any permissions anywhere else.
Thanks,
Marty Ford
Solutionsoft
------------------------------
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 3445
**************************************