[11721] in Perl-Users-Digest
Perl-Users Digest, Issue: 5320 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 7 15:07:17 1999
Date: Wed, 7 Apr 99 12:00:28 -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, 7 Apr 1999 Volume: 8 Number: 5320
Today's topics:
Re: Accessing a unix serial port (Neil Cherry)
Active State 5.09 Perl processes hanging under NT 4.0 (Bill Morgan)
Arrays in Learning Perl 2nd Edition northernnj@my-dejanews.com
Re: Arrays in Learning Perl 2nd Edition <gregm@well.com>
Re: Beginner PERL Question, Inserting into Sql database (Abigail)
Re: buggy counter? (Jonathan Stowe)
cgi script question <ldc023@nabu.isg.mot.com>
Re: cgi script question (Dave Cross)
Re: Communicating with a C shell script <cmcurtin@interhack.net>
convert IP to country of origin nguyen.van@imvi.bls.com
Re: duplicate checker <cassell@mail.cor.epa.gov>
Re: duplicate checker <SPAMBLOCKsurgie@bellsouth.net>
Dyn-IP "wanna be" 1-liner <SpamMeNOT.3pound@iname.com>
exponential notation to decimal notation <mgcook@ic.delcoelect.com>
Re: free computer5 <fox@simsoft.clara.net>
Re: Help required urgently on CGI Perl <cassell@mail.cor.epa.gov>
Re: Installing CPAN modules <donny@impulsesoftware.com>
Re: Is there any "Perl Editor "? Help (Josh ''RudeSka'' Rush)
java exec'ing perl script <randy_pierce@stortek.com>
Re: Most elegant random string generator? <gregm@well.com>
Re: Most elegant random string generator? <gregm@well.com>
Re: Perl as a first programming language - suitability, <cassell@mail.cor.epa.gov>
Re: Perl as a first programming language - suitability, (Abigail)
Re: Perl as a first programming language - suitability, (Abigail)
Re: Perl calls PGP <donny@impulsesoftware.com>
Re: Perl IDE/GUI for Linux (Abigail)
Re: Perl IDE/GUI for Linux <cassell@mail.cor.epa.gov>
Re: Perl run from IIS would not see an env variable? (Jonathan Stowe)
Perlshop transmission error #3 - possible solution bob@runware.com
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 07 Apr 1999 17:22:47 GMT
From: njc@dmc.uucp (Neil Cherry)
Subject: Re: Accessing a unix serial port
Message-Id: <slrn7gn586.5fm.njc@dmc.uucp>
On Tue, 06 Apr 1999 21:13:40 -0700, Andrew Perrin wrote:
>Lose the <> around the filehandle. Also, by convention (but not required),
>handles are often written in all caps, so you might want to use DEV instead
>of dev as your filehandle.
I tried both and it helped, I also switch the open to a sysopen. It
seems I am approaching the problem the wrong way. Just not sure how to
attack it just yet. It would also help if the the receive on the
device I am speaking to worked. I need to replace that chip now.
--
Linux Home Automation Neil Cherry ncherry@home.net
http://members.home.net/ncherry (Text only)
http://meltingpot.fortunecity.com/lightsey/52 (Graphics GB)
http://www2.cybercities.com/~linuxha/ (Graphics US)
------------------------------
Date: Wed, 7 Apr 1999 15:01:40 GMT
From: wmorgan@nswc.navy.mil (Bill Morgan)
Subject: Active State 5.09 Perl processes hanging under NT 4.0
Message-Id: <1999Apr7.145840.10793@relay.nswc.navy.mil>
I just installed Active State Perl 5.09 under NT 4.0. We are running lots of
Perl CGI scripts from our web server, which is Netscape Enterprise v3.6. It
looks like some of the processes are hanging around after the scripts finish,
because every day when I look at the NT task manager, there are 20 or 30
Perl.exe processes in there that don't go away and are soaking up resources.
All of our Perl scripts have explicit "exit" statements in them when they
finish, so I'm not sure what is causing this. Has anyone else experienced
this problem? Please email any replies as well as posting to this group.
Thanks!
---------------------------------------------------------------------------
William E. Morgan NAVAL SURFACE WARFARE CENTER
Code N84 email: wmorgan@nswc.navy.mil
17320 Dahlgren Rd. phone: (540)653-6088
Dahlgren, VA 22448 fax: (540)653-1810
------------------------------
Date: Wed, 07 Apr 1999 16:32:20 GMT
From: northernnj@my-dejanews.com
Subject: Arrays in Learning Perl 2nd Edition
Message-Id: <7eg1ak$ama$1@nnrp1.dejanews.com>
I'm trying to learn Perl programming from the O'reilly book, Learning Perl 2nd
Edition.
I can't seem to enter lists of strings.
The following are examples from the book.
#ex_03-1a
#Learning Perl Appendix A, Exercise 3.1
print "Enter the list of strings:\n";
@list = <STDIN>;
@reverselist = reverse @list;
print @reverselist;
#ex_03-1b
#Learning Perl Appendix A, Exercise 3.1 alternate
print "Enter the list of strings:\n";
print reverse <STDIN>;
#ex_03-2
#Learning Perl Appendix A, Exercise 3.2
print "Enter the line number: "; chomp($a = <STDIN>);
print "Enter the lines, end with ^D:\n"; @b = <STDIN>;
print "Answer: $b[$a-1]";
#ex_03-3
#Learning Perl Appendix A, Exercise 3.3
srand;
print "List of strings: "; @b = <STDIN>;
print "Answer: $b[rand(@b)]";
What format should I enter the lists of strings in?
Do I have to press control+D after I enter the list?
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 07 Apr 1999 10:25:17 -0700
From: Greg McCann <gregm@well.com>
To: northernnj@my-dejanews.com
Subject: Re: Arrays in Learning Perl 2nd Edition
Message-Id: <370B94FD.3526E512@well.com>
northernnj@my-dejanews.com wrote:
>
> I'm trying to learn Perl programming from the O'reilly book, Learning Perl 2nd
> Edition.
>
> I can't seem to enter lists of strings.
>
> The following are examples from the book...
>
> What format should I enter the lists of strings in?
> Do I have to press control+D after I enter the list?
I tried the first example. Entering each string on a new line worked well for
me. Quotes were not necessary. The terminating character may be
platform-dependent. On NT, a ^Z (Control-Z) on a line by itself, followed by
<Enter>, works well.
Greg
------------------------------
Date: 7 Apr 1999 18:45:25 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Beginner PERL Question, Inserting into Sql database
Message-Id: <7eg945$8ep$9@client2.news.psi.net>
coldfusion200029@my-dejanews.com (coldfusion200029@my-dejanews.com) wrote
on MMXLV September MCMXCIII in <URL:news:7efpni$3ut$1@nnrp1.dejanews.com>:
// I was wondering how to enter data in to a sql database, I have a bunch of
// lists of users, and addresses that I wanted to enter into a Sql Database. I
// have read that using the split command I can split the data and enter them
// seperatly into the database.....but I am not sure exactl how this
// works....please help!!!!
So, what's your problem? You don't know how split works? You don't know
how to connect to the database? You don't know the SQL to insert it in
your database? You don't know how to design your tables?
Or don't you just know anything?
Abigail
--
perl -wleprint -eqq-@{[ -eqw\\- -eJust -eanother -ePerl -eHacker -e\\-]}-
------------------------------
Date: Wed, 07 Apr 1999 16:07:46 GMT
From: gellyfish@gellyfish.com (Jonathan Stowe)
Subject: Re: buggy counter?
Message-Id: <370b828f.29710422@news.dircon.co.uk>
On Wed, 7 Apr 1999 15:40:32 +0400, Manida Ivan <mis@sparc.spb.su>
wrote:
You will find a buggy counter in Mothercare ....
<sorry I just couldnt resist ...>
/J\
------------------------------
Date: Wed, 07 Apr 1999 13:37:16 -0400
From: David Capredoni <ldc023@nabu.isg.mot.com>
Subject: cgi script question
Message-Id: <370B97CC.3D4E6FBB@nabu.isg.mot.com>
Hi
I was just wondering if anyone knew how to read a html file from another
web site and use the information in your cgi script?
Thanks
------------------------------
Date: Wed, 07 Apr 1999 18:20:33 GMT
From: dave@mag-sol.com (Dave Cross)
Subject: Re: cgi script question
Message-Id: <370ca0cb.30176239@news.demon.co.uk>
On Wed, 07 Apr 1999 13:37:16 -0400, David Capredoni
<ldc023@nabu.isg.mot.com> wrote:
>Hi
>
>I was just wondering if anyone knew how to read a html file from another
>web site and use the information in your cgi script?
>
>Thanks
You need to get the LWP module bundle from CPAN. This makes these
kinds of tasks very easy.
Dave...
dave@mag-sol.com
Magnum Solutions Limited <http://www.mag-sol.com>
London Perl M[ou]ngers <http://london.pm.org>
------------------------------
Date: 07 Apr 1999 13:52:09 -0400
From: Matt Curtin <cmcurtin@interhack.net>
Subject: Re: Communicating with a C shell script
Message-Id: <xlxbth0qpx2.fsf@gold.cis.ohio-state.edu>
>>>>> In article <7eb6h0$bph$1@nnrp1.dejanews.com>,
menardm@my-dejanews.com writes:
menardm> I have a perl cgi script that I'm using to kick off a C shell
menardm> script (ultimately I could rewrite the Csh script code and
menardm> add its functionality to the perl script, but thats not a
menardm> time option right now).
[...]
menardm> I'm having trouble getting the perl script and the Csh script
menardm> to communicate properly.
You're in trouble. $< does not read from STDIN; it reads from the
*tty*. csh programming is to be avoided at all cost.
http://www.lib.ox.ac.uk/internet/news/faq/archive/unix-faq.shell.csh-whynot.html
--
Matt Curtin cmcurtin@interhack.net http://www.interhack.net/people/cmcurtin/
------------------------------
Date: Wed, 07 Apr 1999 18:34:42 GMT
From: nguyen.van@imvi.bls.com
Subject: convert IP to country of origin
Message-Id: <7eg8g3$gnk$1@nnrp1.dejanews.com>
Hello everyone,
I just wonder there is any way to convert IP address to country of origin. Is
there any perl script to do that. Please give me some hints. By the way, is
there any company doing this kind of work ? Please give me some names of
companies.
Thanks
Van Nguyen
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 07 Apr 1999 09:53:59 -0700
From: "David L. Cassell" <cassell@mail.cor.epa.gov>
Subject: Re: duplicate checker
Message-Id: <370B8DA7.D6F18BAA@mail.cor.epa.gov>
Larry Rosler wrote:
>
> In article <370AA001.11747E2F@mail.cor.epa.gov> on Tue, 06 Apr 1999
> 17:00:01 -0700, David L. Cassell <cassell@mail.cor.epa.gov> says...
> > Surgie wrote:
> > > I'm wondering if there was a built-in perl function to check if 2 arrays
> > > have any of the same entries, and if not if anyone has a good function I
> > > could use?
> ...
> > > and it would tell me there was a duplicate (return false, true, whatever)
> >
> > You want the intersection of two arrays. At the command line,
> > type 'perldoc -q intersection' and get the FAQ for this question:
> > "How do I compute the difference of two arrays? How do I compute
> > the intersection of two arrays?"
> >
> > perldoc is worth learning to use. You'll always be happier
> > finding your own answers in a second, rather than waiting hours
> > to have some jerk just say "At the command line, type 'perldoc -q
> > intersection'." :-)
>
> You are being rather harsh on someone who might never have studied
> Boolean algebra. I would guess that had Surgie known to search the
> documentation for 'intersection' he might have used that rather
> technical term in the problem statement.
I hope that didn't really come across as harsh. Oops. I guess
yesterday wasn't one of my better days. I thought all the insult
was self-deprecatory.
> `perldoc -q array` would have produced the FAQ with 'intersection' in
> its title (among several others), but even that wouldn't have answered
> the problem without knowing what 'intersection' means.
>
> Only a complete reading of the section 'Arrays' in perlfaq4 might have
> sufficed. That would have had long-lasting good effects, but would also
> have taken longer than simply asking here for a pointer to a function.
True. Are you going to submit an addendum to that particular
FA Question, so that there are keywords that would be found by someone
without any exposure to set theory?
> --
> (Just Another Larry) Rosler
> Hewlett-Packard Company
> http://www.hpl.hp.com/personal/Larry_Rosler/
> lr@hpl.hp.com
David
--
David L. Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Wed, 07 Apr 1999 18:15:04 GMT
From: "Surgie" <SPAMBLOCKsurgie@bellsouth.net>
Subject: Re: duplicate checker
Message-Id: <IgNO2.6167$gv2.1354685@news2.mco>
I'm not a professional programmer, just a weekend programmer ;)
And btw, I've never had boolean algebra, and it didnt come off as harse =)
Thanks for all your help guys,
Surgie
David L. Cassell wrote in message <370B8DA7.D6F18BAA@mail.cor.epa.gov>...
>Larry Rosler wrote:
>>
>> In article <370AA001.11747E2F@mail.cor.epa.gov> on Tue, 06 Apr 1999
>> 17:00:01 -0700, David L. Cassell <cassell@mail.cor.epa.gov> says...
>> > Surgie wrote:
>> > > I'm wondering if there was a built-in perl function to check if 2
arrays
>> > > have any of the same entries, and if not if anyone has a good
function I
>> > > could use?
>> ...
>> > > and it would tell me there was a duplicate (return false, true,
whatever)
>> >
>> > You want the intersection of two arrays. At the command line,
>> > type 'perldoc -q intersection' and get the FAQ for this question:
>> > "How do I compute the difference of two arrays? How do I compute
>> > the intersection of two arrays?"
>> >
>> > perldoc is worth learning to use. You'll always be happier
>> > finding your own answers in a second, rather than waiting hours
>> > to have some jerk just say "At the command line, type 'perldoc -q
>> > intersection'." :-)
>>
>> You are being rather harsh on someone who might never have studied
>> Boolean algebra. I would guess that had Surgie known to search the
>> documentation for 'intersection' he might have used that rather
>> technical term in the problem statement.
>
>I hope that didn't really come across as harsh. Oops. I guess
>yesterday wasn't one of my better days. I thought all the insult
>was self-deprecatory.
>
>> `perldoc -q array` would have produced the FAQ with 'intersection' in
>> its title (among several others), but even that wouldn't have answered
>> the problem without knowing what 'intersection' means.
>>
>> Only a complete reading of the section 'Arrays' in perlfaq4 might have
>> sufficed. That would have had long-lasting good effects, but would also
>> have taken longer than simply asking here for a pointer to a function.
>
>True. Are you going to submit an addendum to that particular
>FA Question, so that there are keywords that would be found by someone
>without any exposure to set theory?
>
>> --
>> (Just Another Larry) Rosler
>> Hewlett-Packard Company
>> http://www.hpl.hp.com/personal/Larry_Rosler/
>> lr@hpl.hp.com
>
>David
>--
>David L. Cassell, OAO cassell@mail.cor.epa.gov
>Senior computing specialist
>mathematical statistician
------------------------------
Date: Wed, 7 Apr 1999 13:09:43 -0500
From: "Jay J" <SpamMeNOT.3pound@iname.com>
Subject: Dyn-IP "wanna be" 1-liner
Message-Id: <J8NO2.699$s4.4396230@rsnws01.mn.mediaone.net>
Half jokingly, but - can someone think of a way to get rid of the seperate
'my' line, and still be strict compliant?
#!/usr/bin/perl -wl
my %seen = (); ## thanks Perl-Cookbook, cool dedupe
print (my $ip = [ grep { ! $seen{$_}++ } grep !/255.255.255.255/, map
/([1-9]\d+\.\d+\.\d+\.\d+)/ } grep /ppp/, map { split /s+/ }
`/sbin/route -n` ]->[0]);
Also, is there an easier way to get at the first element of the array
returned?
Now, if I could only fit the lwp stuff on that line, I can update my IP in
one fell swoop.. =)
Perl rocks..
-Jay J
------------------------------
Date: Wed, 07 Apr 1999 11:04:56 -0700
From: "Micah G. Cook" <mgcook@ic.delcoelect.com>
Subject: exponential notation to decimal notation
Message-Id: <370B9E48.3D23@ic.delcoelect.com>
Looking for a module to convert exponential notation
to decimal notation, I found one that will convert
decimal notation to exponential notation, but not
the other way around.
------------------------------
Date: Wed, 07 Apr 1999 18:55:01 GMT
From: "Fox" <fox@simsoft.clara.net>
Subject: Re: free computer5
Message-Id: <9SNO2.57580$Eb.11337@nnrp2.clara.net>
dont click this link: SCUSE THE FRENCH but... ITS A LOAD OF BOLLOCKS!
webmaster wrote in message <7eg4sd$bsp$1@iceman.tac.net>...
>Free Computer at http://giveaways.arecool.net
>
>DELL IS GIVING AWAY 500 FREE PENTIUM 500 Computers to celebrate their 5th
>anniversary.
>
>Hurry and if you are one of the first 500 people you win a new computer!!!
>
------------------------------
Date: Wed, 07 Apr 1999 11:22:32 -0700
From: "David L. Cassell" <cassell@mail.cor.epa.gov>
Subject: Re: Help required urgently on CGI Perl
Message-Id: <370BA268.532BB520@mail.cor.epa.gov>
Ronald J Kimball wrote:
>
> Arnab Guin <arnab@india.ti.com> wrote:
>
> > I have created a homepage which uses forms extensively .All my scripts
> > are in Perl and they work from my directory .However , when I tried to
> > upload all my files to Tripod[homepage builder] , I am facing grave
> > problems because I do not know about the Perl location there .Can anyone
> > advise me what to do about this ?
>
> I would advise you to ask Tripod the location of Perl there.
And then, after Tripod tells you the information, you may find
that was not quite the problem. You may at that point want to
go read the ruthlessly-named-but-still-quite-useful
http://www.perl.com/faq/idiots-guide.html
which may point you toward a solution.
HTH,
David
--
David L. Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Wed, 07 Apr 1999 17:48:14 GMT
From: Donny Widjaja <donny@impulsesoftware.com>
Subject: Re: Installing CPAN modules
Message-Id: <370B9AF8.9949014A@impulsesoftware.com>
Hi Erik,
I tried it, but it still give the same error message.
Erik van Roode wrote:
>
> Donny Widjaja wrote:
> >
> > Hi,
> >
> > I have a question about installing CPAN modules.
> > I try to install a CPAN module on my virtual server (I am not a root and
> > I can't be a root).
> > I do it in the following step "perl Makefile.pl", "make" and 'make
> > install PREFIX="usr/local"'.
> >
> > The problem occurs in the 'make install PREFIX="usr/local"', and these
> > are the output that I got.
>
> [snip]
>
> Try specifying the prefix as an absolute path, something like
> PREFIX=/home/xxx/user/local
> or whatever the path to the directory you want to use is
>
> Erik
------------------------------
Date: Wed, 07 Apr 1999 09:41:26 -0800
From: alf2@swbell.net (Josh ''RudeSka'' Rush)
Subject: Re: Is there any "Perl Editor "? Help
Message-Id: <7QMO2.11175$LX.4542407@WReNphoon3>
Yes. There is a Perl editor. It is called emacs.... (or vi if you wish) :)
**** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ****
------------------------------
Date: Wed, 07 Apr 1999 11:22:42 -0600
From: PiercRT <randy_pierce@stortek.com>
Subject: java exec'ing perl script
Message-Id: <370B9462.B2AF753D@stortek.com>
I have a java servlet running under Jigsaw which execs a perl program.
The perl program is a very useful thing which we use to monitor specific
hardware. The servlet opens a pipe and writes commands to the perl
program and reads responses. It doesn't seem to matter if I run this
under the complete web server or if I simply start a VM running a test
class to do the exec, same behavior both ways. The problem occurs when I
kill the VM that is running the java class which is execing the perl
interpreter which is processing the perl script. The perl.exe does not
go away. (This is all running on NT4.0 service pak 4.) I can open the
task manager and find an entry for perl.exe, kill it and then it goes
away of course, but shouldn't the perl script go away when the VM is
killed. I would think that the pipe would close and the perl 'while
(<STDIN>) ' would see the pipe close and the script would fall out of
the read loop and die. What am I missing here? Thanks in advance for any
insight you might give me.
sincerely,
randy pierce
randy_pierce@stortek.com
------------------------------
Date: Wed, 07 Apr 1999 09:06:25 -0700
From: Greg McCann <gregm@well.com>
To: dragons@scescape.net
Subject: Re: Most elegant random string generator?
Message-Id: <370B8281.793B6E2A@well.com>
Matthew Bafford wrote:
> my @chars = (0, 0..9, 'A'..'Z', 'a'..'z');
Aha! You caught my (accidental) duplication of '0'. <blush> You're
more observant than I am.
Greg
------------------------------
Date: Wed, 07 Apr 1999 09:35:56 -0700
From: Greg McCann <gregm@well.com>
To: Tramm Hudson <hudson@swcp.com>
Subject: Re: Most elegant random string generator?
Message-Id: <370B896C.52406A27@well.com>
Tramm Hudson wrote:
> What? Without being too obfuscatory? Isn't that the whole reason
> for these sorts of micro-optimizational things? Besides, it all comes
> down to how you define elegant...
Concise, pretty, yet understandable. (Of course the question arises,
"Understandable to who?".) I try to avoid writing something that I'll have a
hard time understanding in six months - unless I put in lots of comments.
> Since this is to be used for generating random session keys, why is
> there the requirement that they contain both letters and numbers? How
> about just a random number? Magic cookies don't need to be pronouncable
> or even sensical.
For the greatest number of possibilities with the fewest characters. A string
of 20 digits has 1.00E+20 possible values, while a string of 20 mixed digits,
upper and lower case alpha characters has approximately 7.04E+35 possible
values.
> Uh oh -- your C or Pascal upbringing is showing. Big list of
> declarations with comments. It is hard to shake what they've
> taught you. However, your use of lexical variables is also quite
> good (do you know why to use 'my' instead of 'local'?)
Uh, not exactly. But I sort of understand the difference, so my personal rule
of thumb is "always use 'my' unless I know the reason why I should use 'local'
instead".
> >@charlist = ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
> > 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
> > 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
> > 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
> > 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z');
>
> Definitly check into the range operators. ('A'..'Z') in a list
> context is a nice idiom that makes intuitive sense. It also saves
> your reader from having to read the entire list to ensure that you
> have not skipped any letters.
Or accidentally added any! See the extra '0' above.
> Since you've shown that you have been taught good technique (comments,
> warnings, strict, etc) I'll assume that the formatting was due to a
> braindead newsreader.
Indeed. Netscape.
> Anyway, here is my version of the program...
Thanks (to Tramm and all) for the great suggestions. I've learned a lot.
Greg
------------------------------
Date: Wed, 07 Apr 1999 10:06:22 -0700
From: "David L. Cassell" <cassell@mail.cor.epa.gov>
Subject: Re: Perl as a first programming language - suitability, good books ?
Message-Id: <370B908E.34D1465C@mail.cor.epa.gov>
Chris Newman wrote:
>
> I had read some very encouraging reviews about a book called "Perl Cookbook" by
> Tom Christiansen (an OReilly's book) which suits all levels of programmer. Anyone
> get any thoughts on this book?
>
> [snip of Larry Rosler's previous text to save bandwidth]
The 'Perl Cookbook' is a great book. I own it. I'm still
reading through it. I really like it.
But.. I would not consider it a starter. It assumes you know
how to run Perl, and how to use a number of basic Perl features,
and what some system & network features are.
If the llama (Learning Perl) is too basic, then maybe the Cookbook
is a good place to go. But it doesn't provide the reference
materials that the Camel (Programming Perl) does. If you learn
best through following examples, [and are willing to read the
online docs to get the reference material not covered by the
Cookbook] then check it out.
David
--
David L. Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 7 Apr 1999 18:10:08 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl as a first programming language - suitability, good books ?
Message-Id: <7eg720$8ep$1@client2.news.psi.net>
Jeff Kirk (jeff@co.mendocino.ca.us) wrote on MMXLIV September MCMXCIII in
<URL:news:7ee23c$e6p$1@ultra.sonic.net>:
[ Please put a reply to a posting *below* the posting. English is read
top to bottom, not bottom to top. Also, please trim the original article
to just those parts that are relevant ]
:: Jonathan <jonathan@meanwhile.freeserve.co.uk> wrote in message
:: news:7edtvp$v10$1@news4.svr.pol.co.uk...
::
:: > But most important of all, I was wondering if anyone could recommend a
:: Perl
:: > book aimed at people like my friend ? Something that explains what an
:: array
:: > is, what a sort is, even what an interpreter is ? (I'm too far away from
:: her
:: > to make giving lessons easy and she's the sort of person who takes this
:: > stuff better from books.) I know that there's a Perl For Dummies book, but
::
:: O'Reilly is the place to go. The Camel book and the Ram book are
:: indespensible.
:: http://perl.oreilly.com/
The Camel and Ram books are useless for someone without programming
knowledge. In fact, I doubt they have much use for anyone not familiar
with Perl.
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
.qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
.qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'
------------------------------
Date: 7 Apr 1999 18:15:37 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl as a first programming language - suitability, good books ?
Message-Id: <7eg7c9$8ep$2@client2.news.psi.net>
Jonathan (jonathan@meanwhile.freeserve.co.uk) wrote on MMXLIV September
MCMXCIII in <URL:news:7edtvp$v10$1@news4.svr.pol.co.uk>:
$$ A friend of mine from an arts background is interested in learning to
$$ program, partly from intellectual curiousity and partly for career reasons.
$$ She's extremely smart and a great problem solver, but she's never written a
$$ program in any language. Until recently I didn't know what language to
$$ suggest to her - Basic's too ugly, Pascal is a dead end. And definitely not
$$ C++ (although it's what I do half my work in myself - my other languguage is
$$ Masm, which I felt was *almost* as inappropriate.) I was thinking maybe
$$ you-know-what, but last week I started to learn Perl.
I wouldn't suggest Perl as a first language. Perl already proves to be
confusing enough for many people that do know other language.
Learn how to program first. Only then you may want to use Perl. I say
"may", as Perl is a unique language, that is disliked by many people.
It's not suitable for everyone.
I'd suggest learning Python or Pascal first. Knowledge of C, sh, awk
and Unix in general is certainly an advantage when learning Perl.
Abigail
--
perl -wle '$, = " "; print grep {(1 x $_) !~ /^(11+)\1+$/} 2 .. shift'
------------------------------
Date: Wed, 07 Apr 1999 17:36:24 GMT
From: Donny Widjaja <donny@impulsesoftware.com>
Subject: Re: Perl calls PGP
Message-Id: <370B9832.A34A8F5C@impulsesoftware.com>
Hi,
I had the same problem with you, and I think we can use Expect.pm. I
have not try this, so I don't know if it is going to work or not.
First you can download Expect.pm from the CPAN, and the Expect.pm
requires IO::Tty and IO::Stty from CPAN.
I hope this help.
cryptoman@my-dejanews.com wrote:
>
> Hi,
>
> I am trying to write Script to call PGP's functions:
>
> open (WRITEME, "|pgpv message.sig -o message");
> print WRITEME "\n";
> close (WRITEME);
>
> It should force a Carriage Return when PGP asks:
> "File to check signature against [message]: "
>
> But it doesn't work. I tried the same script on "rm -i test.txt" and it
> works. Could u tell me is there any probleme with PGP or do I have to do it a
> different way.
>
> Thanks!
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 7 Apr 1999 18:23:37 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl IDE/GUI for Linux
Message-Id: <7eg7r9$8ep$3@client2.news.psi.net>
Sauro Sgatti (sauro@fol.it) wrote on MMXLV September MCMXCIII in
<URL:news:7eervo$sbe$1@fe1.cs.interbusiness.it>:
||
|| Where I find Perl IDE or GUI on Linux ?
xterm -e vi &
HTH. HAND.
Abigail
--
perl -e 'for (s??4a75737420616e6f74686572205065726c204861636b65720as?;??;??)
{s?(..)s\??qq \?print chr 0x$1 and q ss\??excess}'
------------------------------
Date: Wed, 07 Apr 1999 11:35:35 -0700
From: "David L. Cassell" <cassell@mail.cor.epa.gov>
To: Sauro Sgatti <sauro@fol.it>
Subject: Re: Perl IDE/GUI for Linux
Message-Id: <370BA577.CC9DA6A6@mail.cor.epa.gov>
Sauro Sgatti wrote:
>
> Hi,
> Where I find Perl IDE or GUI on Linux ?
>
> Please also reply an email.
>
> Thnks in advance.
You don't need a Perl IDE on Linux. Perl doesn't have the
traditional write-compile-link-run-curse-debug cycle of
languages like C. Just write your Perl code in any editor
you like and run it at the command line. Oh, and be sure
to use the -w flag on your shebang line.
A GUI? If you want to produce Perl code that uses a
gooey interface, look into Perl/Tk. The Tk module is
at CPAN (as is everything else :-). There's a new
O'Reilly book on Perl/Tk too, if you're interested.
David
--
David L. Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Wed, 07 Apr 1999 16:02:20 GMT
From: gellyfish@gellyfish.com (Jonathan Stowe)
Subject: Re: Perl run from IIS would not see an env variable?
Message-Id: <370b812a.29353797@news.dircon.co.uk>
On Wed, 07 Apr 1999 15:21:20 GMT, desafinado@jazzvalley.com wrote:
>Hi everybody,
>
>I am running a web server using the following system:
>
>OS: NT 4.0
>HTTP server: IIS 3.0
>Perl: ActiveState Perl 5.004
>
>As an administrator, I have created an environment variable
>called PERL5LIB containing an additional libraries root for Perl.
>
>Perl perfectly recognizes it when I ask $ENV{'PERL5LIB'}
>or when I ask @INC.
>
>Perl run under IIS would recognize it neither as $ENV{'PERL5LIB'}
>(it says "") nor in @INC (it does not list the value of $ENV{'PERL5LIB'}).
>
>What is the problem?
>
That'll certainly be because the environment variable is not getting
set for the IUSR_<w3hatever> user that IIS runs as - as such it is am
NT configuration issue and not a Perl one.
/J\
------------------------------
Date: Wed, 07 Apr 1999 09:57:06 -0800
From: bob@runware.com
Subject: Perlshop transmission error #3 - possible solution
Message-Id: <u4NO2.11213$LX.4553937@WReNphoon3>
After much experimenting and loss of hair, I narrowed down the problem and
came up with a possible solution
for the Transmission Error #3 issue. (At least it worked on my server.)
Also, please forgive my ragged perl
jargon: I'm a newbie for this language.
The problem seems to be in the subroutine "ReadParse". It is supposed to
grab the passed data from
the "Enter Shop" form and format it into a associative array. This array is
supposed to be globally
accessible (at least within the environment of the script). What appears to
happen sometimes is that the
array created by ReadParse stays local to the subroutine instead of being
made available to the entire
script. (Why this happens only on some servers is for somebody else to
determine.) The result of this
is that none of the passed data is available for running the rest of the
script. The "Transmission Error #3"
just happens to be the first point where this array is audited. If you
tried remarking out this particular error
test, you probably just got another error from the next point where the
array is audited.
Once the problem was determined, the solution was fairly easy. The
ReadParse data just had to be made
globally accessible. As follows:
# This is the original code. (With the subsequent code snipped out.)
sub ReadParse {
if (@_) {
local (*in) = @_;
}
#-------- etc -------#
# This is the modified code. (With the subsequent code snipped out.)
sub ReadParse {
if (@_) {
(*in) = @_;
}
#-------- etc -------#
That's it!
Your results may vary. I'm reasonably sure they will. But this method
worked for me.
I did find an alternative method that is not as pretty.
Also in the ReadParse sub, leave the "local" statement intact, but dump the
result of the newly built array
into the already global associative array "input". Insert a new line into
the subroutine as follows:
# This is the original code (with the preceeding code snipped out).
$in{$key} .= $val;
}
return 1; # just for fun
}
#-----------------------------#
# This is the modified code (with the preceeding code snipped out).
$in{$key} .= $val;
%input = %in;
}
return 1; # just for fun
}
#-----------------------------#
I hope this helps. I'm sure there are many, many other ways to deal with
this problem. The best one
would be finding the reason why the error is inconsistent from server to
server, but that is beyond my
limited ability. Comments are welcome.
bob@runware.com
**** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ****
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 5320
**************************************