[15936] in Perl-Users-Digest
Perl-Users Digest, Issue: 3349 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 13 21:10:27 2000
Date: Tue, 13 Jun 2000 18:10:18 -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: <960945018-v9-i3349@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 13 Jun 2000 Volume: 9 Number: 3349
Today's topics:
Re: Larry Rosler interview on perl.com! <htp@mac.com>
Re: Larry Rosler interview on perl.com! <care227@attglobal.net>
Re: Larry Rosler interview on perl.com! (Bart Lateur)
Re: Larry Rosler interview on perl.com! <htp@mac.com>
Re: Larry Rosler interview on perl.com! <htp@mac.com>
Re: Larry Rosler interview on perl.com! (Jerome O'Neil)
Re: Length of an Array <abe@ztreet.demon.nl>
Re: Length of an Array <godzilla@stomp.stomp.tokyo>
Re: my vs. our (Bart Lateur)
Re: newby hex question <Jonathan.L.Ericson@jpl.nasa.gov>
Re: Perl + web history (was: Re: ANSI Perl: No Way !!!) <elaine@chaos.wustl.edu>
Re: Phonetic searching - Any Examples? <brondsem@my-deja.com>
Re: ppm will not work. I get this error message. (Bart Lateur)
Re: print pdf (Sebastian Marius Kirsch)
Re: putting a sub into seperate file (Bart Lateur)
pw() function question law_40@my-deja.com
Re: pw() function question <ivoz@starmail.com>
Re: pw() function question <lauren_smith13@hotmail.com>
Re: qw() question, please advise me! <lauren_smith13@hotmail.com>
Re: qw() question, please advise me! <care227@attglobal.net>
Re: Simulating a key press using PERL <mrizzo@ismd.ups.com>
Re: Strange permission problems with ActivePerl 613 (Peter McMorran)
Symbolic reference under Strict: any alternative? <cdessimoz@ark.ch.nospam>
Re: Symbolic reference under Strict: any alternative? (Eric Bohlman)
Re: Syntax checker <bg@skypoint.com>
Re: Windows<->Macintosh character set translation (Bart Lateur)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 14 Jun 2000 07:41:59 +0930
From: Henry <htp@mac.com>
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <htp-7FA709.07415914062000@news.metropolis.net.au>
In article <394641A0.47AC9E87@attglobal.net>, Drew Simonis
<care227@attglobal.net> wrote:
>> NO approachable documentation ships with the standard distribution
>> of Perl.
>>
>> If it ain't there, it doesn't matter how good you OS skills are,
>> you won't find it.
>
> I guess this begs the question as to what you consider approachable.
> I find the perlfaq VERY informative and helpfull,
See <htp-A05D10.07093514062000@news.metropolis.net.au>.
> and while it may
> take a second for a new user to figure out how to type:
>
> $ perldoc perldoc
>
> I hardly see that as an obstacle.
Well, apart from the fact that that is _not_ how you actually access
Perl help on all (and an ever-increasing number) of workstations, sure -
that's not the problem.
(Mac users, for example, have had about 16 years to get used to the idea
of accessing help from the "Help" menu.)
But that's an issue for the individual platform porters to address, and
not the obstacle I was raving on about.
> The documentation is also handily
> available on perl.com if you don't have your perl distro handy.
Hmmm, yes, well. Larry Rosler and I have addressed this in (multiple)
previous posts. In a word - inadequate.
> The perldocs are MASSIVE. While they may be somewhat technically
> complicated (perlxstut... ugh) they are topical and accurate.
Agreed.
> So I ask again... is it the format of the documentation or the
> content that you speak against?
And I reply (again) that it's the _lack_ of approachable documentation
(documentation that newbies can comprehend) that ships with the standard
distribution that's got my goat.
Henry.
------------------------------
Date: Tue, 13 Jun 2000 18:28:09 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <3946B579.FEF423B6@attglobal.net>
Henry wrote:
>
> And I reply (again) that it's the _lack_ of approachable documentation
> (documentation that newbies can comprehend) that ships with the standard
> distribution that's got my goat.
>
I am failing to see this point. I appologize if my thick headedness
comes into play, but I count myself among the newbies. I am a
programmer by hobby only. I am not an educated programmer (my degrees
are in political science and foreign policy) or a professional one.
I just _like_ Perl. I am that neophyte you speak of, and I have
found the majority of the documents to be _very_ approachable.
When I have had questions, I come to the newsgroups and ask them.
Hopefully, if I've worded my question well and provided examples
of my problem, I will get help and continue learning. While in
the process of learning Perl, I decided to learn C as well. I
find it to be much more daunting, simply because documentation
for C _is_ sparse. Most C programmers are educated and learn
the syntax from textbooks, I guess. But I digress. My point is
that millions of newbies are able to comprehend things far beyond
what you are willing to give them credit for. And while the
docs could be cleaned up and more tutorials added, I think the
existing base is wonderfull and very approachable.
------------------------------
Date: Tue, 13 Jun 2000 22:27:24 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <3946b4c6.435170@news.skynet.be>
Henry wrote:
>I have 49 POD files in my POD folder. Six of the seven files you
>mentioned are _not_ there.
>
>Caveat: MacPerl is a little behind the standard track
It sure is! It's still 5.004!
You may keep complaining that there isn't any readable documentation
yet, but as long as you're sticking to a 2 year old distro... nothing
could ever be added.
But, 5.6 on Mac is in the works. Including the updated docs.
--
Bart.
------------------------------
Date: Wed, 14 Jun 2000 09:07:56 +0930
From: Henry <htp@mac.com>
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <htp-E90A18.09075614062000@news.metropolis.net.au>
In article <39464027.196736AD@attglobal.net>, Drew Simonis
<care227@attglobal.net> wrote:
>> Microsoft's introduction of proprietary extensions has _crippled_
>> the web. Internet Exploiter has probably set us back 4 years in
>> the paltry 5 years that it has been in Microsoft's hands. We'd
>> be cruising the web with 2004 tech if it hadn't been for those
>> bloody extensions.
>
> Maybe I'm not as web savy as you, but I haven't seen the web get
> crippled by anything but its own growth. What specific extensions
> are you talking about here?
document.all - broke just about everything. There are _many_ others.
(In the analogy, map your understanding of "compiler/interpreter" to a
"web browser" and the "extensions" as the "document object model" -
it'll probably help.)
NN: document.layers.bob.<blah>
IE: document.all.bob.<blah>
Which means to do any dynamic HTML, you had to write JavaScript (or, as
Microsft calls it, JScript) to browser sniff and then fork execution
depending on the browser type... and version... and platform...
So we ended up with the nightmare of:
if (nn4up && win) {
...
} elsif (nn4up && mac) {
...
} elsif (nn3up && win) {
...
} elsif (nn3up && mac) {
...
} elsif (unix) {
...
}
else {
...
}
Which meant that web authors spent 70%+ of their time writing browser
checking code and coming up with multiple versions of their page to try
get a consistent behaviour across browsers (types, platforms, versions).
They waste their time doing this, instead of building _better_ websites.
Imagine the sheer lunacy of:
if (MS_perl) {
#!C:\system\framework\perl\
} else {
#!/usr/bin/perl
}
if (MS_perl) {
$doc = new Object(text,"Hello World!\n");
print $doc;
} else {
print "Hello World!\n";
}
The rot has already started, with Microsofts
infection^H^H^H^H^H^H^Hjection of capital into ActiveState.
For those that haven't been paying attention, didn't you know that
"ActivePerl, [is already] the most complete Perl package available!"?
On Windows, it also installs (by default): PerlScript and Perl of
ISAPI...
PerlScript is an ActiveX scripting engine that allows you to use Perl
with any ActiveX scripting host. At this time, ActiveX scripting hosts
include:
* Internet Information Server 3.0+
* Peer Web Services 3.0+
* Microsoft Internet Explorer 4.0+
* Windows Scripting Host
Goodbye security; sorry, doesn't run on Unix or MacOS.
Perl for ISAPI is a plug-in designed to run Perl scripts faster on ISAPI
compliant Web servers. Requires ActivePerl and an ISAPI compliant Web
server such as Microsoft Internet Information Server 3.0+.
Goodbye mod_perl; sorry, doesn't run on Unix or MacOS.
MARK MY WORDS - We will see an ever-increasing number of posts on
c.l.p.m along the lines of:
"My Perl script works perfectly when I test it on my machine at home,
but when I upload it to my internet service provider's web server it
breaks - what's wrong?"
A little probing later will discover that they are using features (only
available in ActivePerl) which go along the lines of:
$agent->processForm($myForm);
$agent->getEmail($myMail);
$agent->filterSPAM();
$agent->toastBread(3);
$agent->bakeCake('banana');
$agent->createWebsite('dom.com');
$agent->tieShoes($mySneakers);
print "Hello World!";
That will reinforce the impression that Active State's Perl is "the most
complete Perl" and that _other_ Perls are lacking. That the standard
distribution is lacking!
Microsoft are masterful at "embrace/extend/destroy" tactics, and they've
already lined up Perl as the next target. Unless something is done to
stop them, they _will_ prevail.
And NO amount of pontificating in the microcosm that is Unix will change
that. The war _MUST_ be fought on the Windows desktop.
sig -HUP @people
Henry.
------------------------------
Date: Wed, 14 Jun 2000 09:13:50 +0930
From: Henry <htp@mac.com>
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <htp-FD1AC6.09135014062000@news.metropolis.net.au>
In article <slrn8kbkhj.9h2.dha@panix6.panix.com>, dha@panix.com (David
H. Adler) wrote:
> Ok, that's your opinion. I disagree.
Then I guess no further discussion is warranted.
Henry.
------------------------------
Date: Wed, 14 Jun 2000 00:59:02 GMT
From: jerome@activeindexing.com (Jerome O'Neil)
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <qNA15.543$Kr1.56582@news.uswest.net>
Henry <htp@mac.com> elucidates:
> In article <0yt15.216$Kr1.19641@news.uswest.net>,
> jerome.oneil@activeindexing.com wrote:
>>> NO approachable documentation ships with the standard distribution of
>>> Perl.
>>
>> Approachable by who?
>
> <sigh> By a newbie. Who else needs _approachable_ documentation?
Well, I think that your expectations about what the documentation should
be is what is causing you problems. The Perl documentation set is supposed
to tell us what Perl does, not how to program. To that end, it does
an admiral job.
A person completely devoid of any programming experience or expertise
is going to find *any* documentation or specifications daunting.
>> I've written in a lot of languages, and Perl
>> is by far the best documented one out there.
>
> If you _already_ know how to program, yes, there's a lot of meaty stuff
> there for you to get stuck into.
>
> But if you _don't_ already know how to program...
Then you shouldn't start with the docs, you should start with something
designed to help you learn to program. Now, I am on the side of the
fence that thinks Perl is an excellent language to start with, *primarily*
due to the wealth of documentation available.
Once a new programmer understands the things common to almost all
languages, the documentation becomes a great resource.
[ snipped list of current documentation tutorials ]
>> all ship with the current distribution. Those are just part of the
>> more than 30 document sections that are sitting on your hard drive
>> right now.
> If (as you say) there is a current flood of tutorials just entering the
> pipeline, I look forward to checking them out - when they land on a
> workstation near me.
Every document I listed ships with the 5.6 distribution. I don't
know Macintosh, but if it doesn't ship with the complete doc set,
I'd say it's broken.
> Until then, I should probably cease and desist my advocacy on the
> grounds that what I've been advocating may have already been delivered
> (in part, at least).
It's good to advocate. Advocation for clearer documentation is a good
thing, and you should continue to do so. In fact, I'm not in total
disagreement with you regarding the tools necessary to access the docs.
They could be better.
Jerome
------------------------------
Date: Wed, 14 Jun 2000 01:41:50 +0200
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: Length of an Array
Message-Id: <emgdksk31rfsvf797eudl3b4lcif3q1tpp@4ax.com>
On Mon, 12 Jun 2000 22:19:43 -0700, "Godzilla!"
<godzilla@stomp.stomp.tokyo> wrote:
> @array = ("zero", "one", "two")
>
> $length = ($#array)
>
> Your length is returned as 2 (two)
Nope, the value in _your_ variable $length is now 2.
It might help you to read the documentation on this, and find out why
you're wrong.
> which is quite correct from a purist
> mathematician viewpoint: 0 1 2
Bullshit, just how many 'purist mathematicians' did ask this? No points
for guessing what their answer is :-)
3 elements are 3 elements.
> No wonder most people dislike math.
Oh well, it seems like your math teacher screwed up _big time_.
--
Good luck,
Abe
------------------------------
Date: Tue, 13 Jun 2000 16:58:14 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Length of an Array
Message-Id: <3946CA96.9E5958A4@stomp.stomp.tokyo>
Abe Timmerman wrote:
> "Godzilla!" <godzilla@stomp.stomp.tokyo> wrote:
> Bullshit....
Has anyone suggested you upgrade your sense
of humor to meet industry standards? If not,
I am suggesting this.
"Anyhow, setting aside oxymoronic mathematical
humor, here is a cute alternative which would
probably be best for human perspective...."
I will ask you to not troll and harass me.
This unacceptable behavior of yours serves
no good benefit and disrupts the harmony
of this newsgroup.
Godzilla!
------------------------------
Date: Tue, 13 Jun 2000 22:40:51 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: my vs. our
Message-Id: <3949b81b.1287936@news.skynet.be>
Drew Simonis wrote:
> I have never heard of a scoping element called our,
>and my Perl docs contain no reference to it.
It's new in 5.6. Very recent. It provides an easy way around complaints
of "use strict" when using global variables.
--
Bart.
------------------------------
Date: Tue, 13 Jun 2000 14:59:41 -0700
From: Jon Ericson <Jonathan.L.Ericson@jpl.nasa.gov>
To: tlynch <tlynch@leading.net>
Subject: Re: newby hex question
Message-Id: <3946AECD.477AD014@jpl.nasa.gov>
[posted and mailed]
tlynch wrote:
> I am trying to build an assembler in perl
Cool.
> The way my program currently works, all memory address are initially in base
> 10. I need to convert this number to hex and concantinate it with an
> opcode.
>
> So say I had opcode = 48
> Memory address = 4096
>
> I'd like to turn this into $Text_record = 481000
perldoc -f sprintf
Jon
--
Knowledge is that which remains when what is
learned is forgotten. - Mr. King
------------------------------
Date: Wed, 14 Jun 2000 00:03:32 GMT
From: Elaine Ashton <elaine@chaos.wustl.edu>
Subject: Re: Perl + web history (was: Re: ANSI Perl: No Way !!!)
Message-Id: <B56C4415.61AB%elaine@chaos.wustl.edu>
in article 8i63gt$4k8$1@newsflash.concordia.ca, Neil Kandalgaonkar at
nj_kanda@alcor.concordia.ca quoth:
> It's a bit frightening how hard it is to find supposedly simple information
> like the date of ASP's introduction. Who knows, maybe in 10 years, certain
> companies will be actually claiming to have invented the internet, rather
> than merely implying it. And they won't be lying; everyone there will
> genuinely believe it.
It's scary just how hard it is to find Perl tidbits as well. The history is
in the aether.
> Perhaps I should rephrase; your grandmother doesn't need a tool that
> *treats* her like an idiot. I am very much for computers as a tool for
> the non-geek; but I find both paradigms, the CLI and the GUI, severely
> lacking. A CLI offers creativity because one can combine tools in n! ways.
> A GUI offers ease of use since its functions are more easily discoverable
> and recognizable. However, it is somewhat lacking in its ability to
> combine tools for creativity; you are usually reduced to selecting prefab
> choices.
Dude, she's *96* and if she can turn one on I'd be surprised, and I'm quite
certain she couldn't care less about technology or the web or tools or the
command line...she wants a web page for her bridge statistics and the game
schedule; just the thing a little database would be perfect for....
The AARP is about to be, if not already, the most powerful lobby on Capitol
Hill filled with the 55+ club and ~50%+ of our fine USA and someone may just
figure out that whomever finds a way to bring technology to these folks in a
simple, elegant fashion will be far and away the leader of the pack.
> I don't primarily regard Perl as being in competition with FrontPage!
No, but take my point...FP is on the low-end yet I know of one large corp
TV network who uses FP as their publishing system for their entire web
presence. Yes, really.
> Anyway, I think you are rather overestimating the "hostility" and its
> overall impact. c.l.p.misc regularly answers CGI questions; EFNet-#perl
> doesn't. Dick Hardt didn't ask anyone's permission before launching the
> Visual Perl project, which is how it's supposed to be with open source.
clpm isn't exactly a love-in :)
And while I have great hopes for 'Visual Perl' and it's offspring, I would
doubt that they will reclaim ground in shops that have chosen other
technologies since changing a production site from the ground up is a big
job that VP may not be compelling enough to warrant. Time will tell.
(btw - VP isn't OpenSource...it's a commercial product)
e.
------------------------------
Date: Tue, 13 Jun 2000 23:40:09 GMT
From: Dave Brondsema <brondsem@my-deja.com>
Subject: Re: Phonetic searching - Any Examples?
Message-Id: <8i6gom$ocd$1@nnrp1.deja.com>
In article <8i5vpq$9or$1@plutonium.compulink.co.uk>,
"Guy Fraser" <guy@firstcreative.com> wrote:
> Hi All.
>
> I'm trying to build a glossary where the user can search through it
to find
> a description for a word.
>
> The client has just asked that a "sounds like" option would be good
so I've
> been reading up on Text::Metaphone
>
> Seems like the tool I need but I can't find any examples of using
it :o(
>
> Does anyone know of a good example of phonetic searching (or any
other cool
> search routines) as I'm pulling my hair out here trying to work out
how to
> do it whilst doing about 16 other jobs at the same time!
>
> Any help or pointers greatly appreciated.
>
> Regards,
>
> Guy, Stressed ;o)
I don't know where you'd start looking, but I think the soundex
algorithm will do what you want.
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 13 Jun 2000 22:37:02 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: ppm will not work. I get this error message.
Message-Id: <3948b6c2.942732@news.skynet.be>
unknown wrote:
>Are you saying win2000 does not work with ppm?
>On the site http://www.activestate.com/Products/ActivePerl/Download.html
>It indicates that win2000 is supported.
No I'm not. But your @INC is funky. The installation procedure should
have added the "site" folder to @INC. It looks like it's missing on your
install, so it looks like part of the installation failed. I just wonder
if the fact that this is Win2k, has anything to do with that failure. If
anyone has experience with this, please share!
I'll have a copy of Win2k in a week or so, so I'll be able to test it
myself.
--
Bart.
------------------------------
Date: 13 Jun 2000 21:56:19 +0200
From: skirsch@moebius.inka.de (Sebastian Marius Kirsch)
Subject: Re: print pdf
Message-Id: <8i63l3$3h8$1@moebius.priv>
Bart Lateur schreibt:
> OTOH, I don't see any library supporting PDFlib. Oi!
Assuming you mean pdflib by Thomas Merz (http://www.pdflib.com/), it
does come with bindings for Perl -- just not very good ones. Christian
Kirsch (the name similarity is purely coincidental) of the iX magazine
has made a rudimentary object-orientated wrapper for it, which is
available from ftp://ftp.heise.de/pub/ix/ix_listings/2000_02. But I
don't know Christian's position on releasing and/or maintaining this
code, and whether Thomas is willing to incorporate it into pdflib.
Anyone interested in this matter should probably contact Christian
(cs@ix.heise.de) or Thomas (tm@pdflib.com).
--
Yours, Sebastian <skirsch@moebius.inka.de>
First things first, but not necessarily in that order.
------------------------------
Date: Tue, 13 Jun 2000 22:42:26 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: putting a sub into seperate file
Message-Id: <394ab8a6.1426896@news.skynet.be>
Daniel van den Oord wrote:
>I want to put some big standard working Subroutines inro another file so It
>isn't in the main cgi anymore.. I can do that with require or use right ????
Yes. Just make sure that this library file can be found (path to it must
be in @INC).
--
Bart.
------------------------------
Date: Tue, 13 Jun 2000 22:04:58 GMT
From: law_40@my-deja.com
Subject: pw() function question
Message-Id: <8i6b5v$kf4$1@nnrp1.deja.com>
I have a script the uses the following commands and works....
@array=qw("this is some text");
this stores in the @array variable four words,
@array[0], @array[1], @array[2], and @array[3]....
however, if I define a variable,
$text="this is some text";
then use,
@array=qw($text);
it does not work. @array only gets assigned @array[0]=$text...
any suggestions?
i'm trying to stores the input from a text file into the an @array.
thanks!
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 14 Jun 2000 02:29:05 +0300
From: "Ivo Zdravkov" <ivoz@starmail.com>
Subject: Re: pw() function question
Message-Id: <3946c394_2@news.nwlink.com>
<law_40@my-deja.com> wrote in message news:8i6b5v$kf4$1@nnrp1.deja.com...
> I have a script the uses the following commands and works....
>
> @array=qw("this is some text");
>
> this stores in the @array variable four words,
>
> @array[0], @array[1], @array[2], and @array[3]....
>
> however, if I define a variable,
>
> $text="this is some text";
> then use,
>
> @array=qw($text);
>
> it does not work. @array only gets assigned @array[0]=$text...
perldoc perlop
>
> any suggestions?
@array=split (/\w+/, $text);
>
> i'm trying to stores the input from a text file into the an @array.
>
> thanks!
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
Date: Tue, 13 Jun 2000 16:53:49 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: pw() function question
Message-Id: <8i6hgu$e3v$1@brokaw.wa.com>
Ivo Zdravkov <ivoz@starmail.com> wrote in message
news:3946c394_2@news.nwlink.com...
>
> <law_40@my-deja.com> wrote in message news:8i6b5v$kf4$1@nnrp1.deja.com...
> >
> > @array=qw($text);
> >
> > it does not work. @array only gets assigned @array[0]=$text...
> >
> > any suggestions?
>
> @array=split (/\w+/, $text);
>
Close, but you have the logic backwards. The OP wants to split on spaces,
not on words.
@array = split (/\s+/, $text);
Lauren
------------------------------
Date: Tue, 13 Jun 2000 15:28:25 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: qw() question, please advise me!
Message-Id: <8i6ch2$b2s$1@brokaw.wa.com>
<law_40@hotmail.com> wrote in message news:8i6ajc$k13$1@nnrp1.deja.com...
>
> @array=qw("this is some text");
>
> this stores in the @array variable four words,
>
> @array[0], @array[1], @array[2], and @array[3]....
Of course the values of those are:
[0] "this
[1] is
[2] some
[3] text"
Are those quotes necessary?
>
> however, if I define a variable,
>
> $text="this is some text";
> then use,
>
> @array=qw($text);
>
> it does not work. @array only gets assigned @array[0]=$text...
You are looking to 'split' the string into its tokens.
@array = split (/ /, $text);
perldoc -f split
Lauren
------------------------------
Date: Tue, 13 Jun 2000 19:07:57 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: qw() question, please advise me!
Message-Id: <3946BECD.2B0AD418@attglobal.net>
law_40@hotmail.com wrote:
>
> it does not work. @array only gets assigned @array[0]=$text...
>
> any suggestions?
>
Don't do it this way. Check the perlop documentation under the
subheading "Quote and Quote-like Operators" and you will see that qw()
doesn't interpolate variables. So qw($variable) is interpreted as a
string literal, '$variable' and not as the variable holding the value
"this is some text"
HTH
------------------------------
Date: Tue, 13 Jun 2000 17:42:51 -0400
From: "Mike Rizzo" <mrizzo@ismd.ups.com>
Subject: Re: Simulating a key press using PERL
Message-Id: <8i69t5$9t2@innsrv.ismd.ups.com>
I tried to install the module using PPM from Jenda's repository and it does
not seem to work. There is
something not working properly in the package. Is
there another location that I can get this package from.
I tried to copy the .gz file down and compile it myself,
but there is not Makefile.pl associated with it.
Any other ideas?
"Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.li> wrote in
message news:3946838f.131667835@news.nikoma.de...
> On Tue, 13 Jun 2000 08:29:35 -0700, Tom Phoenix <rootbeer@redcat.com>
> wrote:
>
> > On Tue, 13 Jun 2000, Mike Rizzo wrote:
> >
> > > The situation is as follows, a piece of code runs and
> > > then it prompts the user with a Message box that needs
> > > to be cleared in order to continue. I would like to have
> > > the Perl code "press" the enter key so that the script
> > > can continue.
> >
> > Do you want Expect.pm?
>
> Or, possibly, Win32::Setupsup if on Windows. I think it's available by
> ppm from Jenda's repository.
>
> Cheers,
> Philip
> --
> Philip Newton <nospam.newton@gmx.li>
> If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: Wed, 14 Jun 2000 00:11:30 GMT
From: mcmorran@visi.net (Peter McMorran)
Subject: Re: Strange permission problems with ActivePerl 613
Message-Id: <3946cdae$3$zpzbeena$mr2ice@news.visi.net>
In <x7hfay34av.fsf@server.matadordesign.com>, on 06/12/00
at 06:47 PM, James Cameron <james@WebEvent.com> said:
>OS: Windows NT 4.0 SP 4 or lower
>Summary: Receiving permission denied error messages when using
>'rmdir'
> after 'opendir' with the latest release.
>Code: This code fails with permission denied in version 613 but
>works
> fine in 522 and every version of Perl I've tried on Unix
> machines.
>######################
>$dir = "mytest";
>$ret = mkdir($dir,"511");
>if (!opendir(DIR1, $dir)) {
> print "Could not get contents of $dir: $!";
>}
>$return = rmdir($dir);
>if ($return ne "1") {
> print "Could not remove $dir. Reason: $!";
>}
>####################
>Note: This is very similar to a bug we reported a long time ago
>with
> the DLL/ISAPI version but which is now resolved (at least
>in 522).
>If you remove the opendir call, it works just fine. However,
>the opendir call should not be affecting the permissions at all.
>We noticed this bug when customers of our perl software
>complained that they could not delete calendars.
Hello James,
The MS operating systems are fussy about deleting or overwriting
open files. The else path of your if ( !opendir(...) ) should
closedir(DIR1). Of course, if you are just trying to check for
existence, or directoryness, there is an easier way -- if (-e
$dir ) for existence, or if (-d $dir ) for directoryness -- no
need to do a dummy open when no reading is intended.
Cheers,
Peter
--
-----------------------------------------------------------
mcmorran@visi.net (Peter McMorran)
-----------------------------------------------------------
------------------------------
Date: Wed, 14 Jun 2000 00:53:09 +0200
From: Christophe Dessimoz <cdessimoz@ark.ch.nospam>
Subject: Symbolic reference under Strict: any alternative?
Message-Id: <3946BB55.85AF3598@ark.ch.nospam>
Hi everybody,
When working under Strict, it's normaly not possible to make any
symbolic reference (unless you desactivate Strict..). Is there any trick
to get the value of the a variable by having its name only (e.g. with
eval)?
use Strict;
$var1='foo';
$var2='var1';
$$var2 can't be used under Strict... how to do?
(This is very useful in case of templates for example).
Thanks,
Christophe D.
cdessimoz@ark.ch.nospam
------------------------------
Date: 13 Jun 2000 23:36:03 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Symbolic reference under Strict: any alternative?
Message-Id: <8i6gh3$kuu$4@slb2.atl.mindspring.net>
Christophe Dessimoz (cdessimoz@ark.ch.nospam) wrote:
: Hi everybody,
:
: When working under Strict, it's normaly not possible to make any
: symbolic reference (unless you desactivate Strict..). Is there any trick
: to get the value of the a variable by having its name only (e.g. with
: eval)?
:
: use Strict;
: $var1='foo';
: $var2='var1';
:
: $$var2 can't be used under Strict... how to do?
If $var1 is a global (package) variable, you *could* do:
{no strict 'refs';
$var3=$$var2;
}
The block limits the scope of the relaxation.
However, if $var1 is a lexical (my) variable, you can't take a symbolic
reference to it as it won't be in the symbol table.
: (This is very useful in case of templates for example).
Hashes make more sense in the case of templates.
------------------------------
Date: Tue, 13 Jun 2000 17:52:39 -0500
From: "Barry Grupe" <bg@skypoint.com>
Subject: Re: Syntax checker
Message-Id: <8i6du0$2bfi$1@shadow.skypoint.net>
> Yes.
>
> perldoc perlrun
>
>
> It is called "perl" :-)
>
> perl -cw my_script
Try that with a 50K program that you left out a '}' in. EOF errors are no
help. :-)
------------------------------
Date: Tue, 13 Jun 2000 22:53:41 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Windows<->Macintosh character set translation
Message-Id: <394cba37.1827958@news.skynet.be>
BP Jonsson wrote:
> I'm looking for Windows<->Macintosh character set translation. I
>suppose someone has done a package already, but I can't find it!
I currently do this by converting Windows to UTF-8, and then UTF-8 to
Mac. Or vice versa. The reason is that UTF-8 encoding is
Unicode-compatible, and Unicode character mappings are available from
<ftp://ftp.unicode.org/Public/MAPPINGS/>. Well... you could use plain
Unicode (2 bytes per character) too, I guess.
Populating a substitution hash from the mapping files from the site
mentioned, is pretty simple, and a simple s/(PATTERN)/$subst{$1}/g will
do.
--
Bart.
------------------------------
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 3349
**************************************