[12543] in Perl-Users-Digest
Perl-Users Digest, Issue: 6143 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jun 27 09:07:50 1999
Date: Sun, 27 Jun 99 06:00:20 -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 Sun, 27 Jun 1999 Volume: 8 Number: 6143
Today's topics:
Re: "Learning Perl" exercise question <mdichirico@lamotionpictures.com>
Re: "Learning Perl" exercises <mdichirico@lamotionpictures.com>
Re: "Learning Perl" exercises <mdichirico@lamotionpictures.com>
Re: "Learning Perl" exercises <mdichirico@lamotionpictures.com>
Re: "Learning Perl" exercises <mdichirico@lamotionpictures.com>
Re: "Learning Perl" exercises (Bart Lateur)
Re: "Learning Perl" exercises <gellyfish@gellyfish.com>
Re: Apologies for multiple posts (Marcel Grunauer)
CGI and SSI <pippo@landptek.com>
Re: Command line parameters / Wildcard characters / Rec (Philip 'Yes, that's my address' Newton)
Re: exercise question from "Learning Perl" <mdichirico@lamotionpictures.com>
Re: Explination of a be <gellyfish@gellyfish.com>
help.... (Peter Hodder)
Re: help.... (Alastair)
Re: How to store hashes (Bart Lateur)
Re: How to store hashes <gellyfish@gellyfish.com>
Re: In Mountain View did Larry Wall <gellyfish@gellyfish.com>
Re: Index of an array-item (Marcel Grunauer)
Re: Learning Perl exercises using reverse <mdichirico@lamotionpictures.com>
Re: NMake Dependency Generator <gellyfish@gellyfish.com>
Re: Novice asks: what's the equivalent perl command to (Bart Lateur)
Re: Novice asks: what's the equivalent perl command to <gellyfish@gellyfish.com>
Novice asks: what's the equivalent perl command to #inc <ing-sol@hkisl.net>
Re: Trying to install Win32 Server ... error message... <gellyfish@gellyfish.com>
Re: Trying to install Win32 Server ... error message... <not@gonna.tell>
Re: using reverse in Learning Perl book <mdichirico@lamotionpictures.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 27 Jun 1999 09:28:27 GMT
From: Mike Dichirico <mdichirico@lamotionpictures.com>
Subject: Re: "Learning Perl" exercise question
Message-Id: <7l4qro$kau$1@nnrp1.deja.com>
Please disregard this particular post. I unintentionally posted this
thread multiple times. Was having problems with deja.com when I posted.
--Mike
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Sun, 27 Jun 1999 09:15:01 GMT
From: Mike Dichirico <mdichirico@lamotionpictures.com>
Subject: Re: "Learning Perl" exercises
Message-Id: <7l4q2k$k57$1@nnrp1.deja.com>
>
> Let me say that a few more times, since you posted so many....
>
Yeah, I know. Didn't take long for the hate mail to come reach my
inbox. Already posted an apology. Thanks for the help. -Mike
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Sun, 27 Jun 1999 09:35:14 GMT
From: Mike Dichirico <mdichirico@lamotionpictures.com>
Subject: Re: "Learning Perl" exercises
Message-Id: <7l4r8i$kel$1@nnrp1.deja.com>
Please disregard this post. I unintentionally posted the same question
several times. Was having problems withe deja.com. --Mike
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Sun, 27 Jun 1999 09:36:58 GMT
From: Mike Dichirico <mdichirico@lamotionpictures.com>
Subject: Re: "Learning Perl" exercises
Message-Id: <7l4rbq$keu$1@nnrp1.deja.com>
Please disregard this post. It's an unintentionally submitted repeat
post. Thanks. --Mike
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Sun, 27 Jun 1999 09:38:53 GMT
From: Mike Dichirico <mdichirico@lamotionpictures.com>
Subject: Re: "Learning Perl" exercises
Message-Id: <7l4rfd$kha$1@nnrp1.deja.com>
Again, please disregard this post. I unintentionally submitted this
post several times to this usenet. Thanks. --Mike
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Sun, 27 Jun 1999 10:14:29 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: "Learning Perl" exercises
Message-Id: <3776f8dc.3206411@news.skynet.be>
Mike Dichirico wrote:
>Again, please disregard this post. I unintentionally submitted this
>post several times to this usenet. Thanks. --Mike
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
Deja.com URGENTLY ought to fix their soft. Multiple presses on a submit
button should NEVER result in multiple posts. Ever.
Bart.
------------------------------
Date: 27 Jun 1999 10:16:38 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: "Learning Perl" exercises
Message-Id: <7l4tm6$5nb$1@gellyfish.btinternet.com>
On Sun, 27 Jun 1999 06:20:00 GMT Casey R Tweten wrote:
> On Sun, 27 Jun 1999 04:58:15 GMT, Mike Dichirico
> <mdichirico@lamotionpictures.com> wrote:
>
> :
> :When I run the program, it asks for me to enter a string like it's
> :supposed to. But after hitting <Enter>, the program just hangs there.
> :I have to hit <Ctrl> + Z to get back to my command prompt.
> :
> :How come it isn't reversing my string like it's supposed to? What am I
> :not adding to the code that it's supposed to have? TIA for any help.
>
>
> You could try ^D on a line by itself.
>
No, he was right, ^Z is the Windows equivalent of ^D on Unix - Most probably
what he is missing is actually entering any text.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 27 Jun 1999 10:35:55 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: Apologies for multiple posts
Message-Id: <3778fd65.7044819@enews.newsguy.com>
Impeded by deja.com, Mike Dichirico <mdichirico@lamotionpictures.com>
wrote:
>A fellow poster mentioned to me via e-mail that I had posted several
>times on the same topic. My apologies to all.
>
>I'm using deja.com to post and had been getting error messages during
>the posting. Apparently, each subsequent attempt I made at posting
>went through and now I look like an idiot asking to get flamed with
>four identical posts.
>
>Not looking to piss anyone off. Just looking for some help. Hope you
>all can forgive me on my mistake and offer me some help. TIA.
Yes. Get a proper newsreader. Posting and reading through deja must be
hell. As you seem to be on Win98, get Forte Agent. There's a free
version available, but the real niceties only come with the shareware
version. http://www.forteinc.com
You can use it for email as well, and since I started to use it, I've
never looked back at M$ Outlock.
Marcel
------------------------------
Date: Sun, 27 Jun 1999 12:26:36 +0200
From: "Pippo" <pippo@landptek.com>
Subject: CGI and SSI
Message-Id: <7l4u8c$vlb$1@aquila.tiscalinet.it>
Hello,
I use Apache as web server. How can I configure it to recognize SSI commands
in dynamic pages generated on the fly by perl CGI script.
THANKS a lot
Pippo
------------------------------
Date: Sun, 27 Jun 1999 11:21:08 GMT
From: nospam.newton@gmx.net (Philip 'Yes, that's my address' Newton)
Subject: Re: Command line parameters / Wildcard characters / Recursive directories
Message-Id: <3775b3ca.212153286@news.nikoma.de>
On Sat, 26 Jun 1999 22:59:23 -0400, Eric Anderson <eman@cc.gatech.edu>
wrote:
> Other command
>line utilities such as 'rm' can apply a given wildcard string
>recursively down directories (such as rm -rf *.html would delete all
>'html' files in the current directory and every subdirectory of the
>current directory).
I rather doubt it. Try it out once on a directory containing a.html
and b.html, which has a subdirectory containing a.html c.html d.html
and see which files get deleted.
(And you did know that you can quote wildcards to hide them from the
shell, didn't you? I know I always do with commands such as find for
this reason, e.g. find / -name '*.o' rather than just *.o. But maybe
that's just me.)
Cheers,
Philip
--
Philip Newton <nospam.newton@gmx.net>
------------------------------
Date: Sun, 27 Jun 1999 09:33:09 GMT
From: Mike Dichirico <mdichirico@lamotionpictures.com>
Subject: Re: exercise question from "Learning Perl"
Message-Id: <7l4r4l$kcv$1@nnrp1.deja.com>
Please disregard this post also. This is just another copy of another
post with the same question. I had uintentionally sent multiple posts
with the same question. Was having problems on deja.com when I
submitted. Thanks. --Mike
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 27 Jun 1999 10:45:46 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Explination of a be
Message-Id: <7l4vcq$5ni$1@gellyfish.btinternet.com>
On Sun, 27 Jun 1999 00:09:00 -0600 Tim wrote:
> Hello,
>
>
> I was wondering if someone could explain how a banner exchange works
> with detail. How does the program know if the banner is seen? How does
> it decide which to show? How does it work the click on the banner to go
> to the right site?
>
Er sorry I'm not even whether these things are even written in Perl - but
even if they are then this still isnt the right group for you. You might
try asking in some group with CGI in its name ...
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 27 Jun 1999 09:05:00 GMT
From: peterh@stealth.com.au (Peter Hodder)
Subject: help....
Message-Id: <3775e8f6.23789941@news.griffith.stealth.com.au>
Where is the best web page to learn Perl?
>From Peter Hodder
peterh@vk2kcf.stealth.com.au
------------------------------
Date: Sun, 27 Jun 1999 11:15:14 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: help....
Message-Id: <slrn7nc5ij.1lk.alastair@calliope.demon.co.uk>
Peter Hodder <peterh@stealth.com.au> wrote:
>Where is the best web page to learn Perl?
There are some tutorials here ;
http://reference.perl.com/query.cgi?tutorials
You should have a look at ;
http://www.perl.com
http://reference.perl.com
To learn the language, you need to practice using it.
HTH.
--
Alastair
work : alastair@psoft.co.uk
home : alastair@calliope.demon.co.uk
------------------------------
Date: Sun, 27 Jun 1999 09:28:15 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: How to store hashes
Message-Id: <3775edbb.357396@news.skynet.be>
Timo Hummel wrote:
>I want to store hashes in a file. What's the best way to do this?
I would use a tab-delimited file. The advantage over what you did, key
on one line, value on one line etc., is that when editing the data with
an external program, you can easily see the link between key and value.
You can even use a spreadsheet (e.g. Excel) to edit the data!
write: (print to file; open file and select filehandle yourself)
{
local($\,$,) = ("\n","\t")
foreach (sort keys %hash) {
print FILE $_,$hash{$_};
}
}
Read:
while(<FILE>) {
chomp;
my($key,$value) = split /\t/;
$hash{$key} = $value;
}
Bart.
------------------------------
Date: 27 Jun 1999 10:52:16 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How to store hashes
Message-Id: <7l4vp0$5nl$1@gellyfish.btinternet.com>
On Sun, 27 Jun 1999 10:43:38 +0100 Timo Hummel wrote:
> I already solved the problem myself. For all those who want to know
> (altough it fails when you use newline characters (\n) in the hashes):
>
> Writing hashes:
> ----snip-----snip------
> open (INF,">filename");
>
You really *must* check whether the open succeeded or not - in this case
it would be pointless to go on so you might want to do something like:
open(INF,">filename") || die "Could open filename - $!\n";
The same goes for the other one as well ...
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 26 Jun 1999 23:33:00 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: In Mountain View did Larry Wall
Message-Id: <7l3nvc$54t$1@gellyfish.btinternet.com>
On 26 Jun 1999 16:45:41 -0700 Tom Christiansen wrote:
> In Mountain View did Larry Wall
> Sedately launch a quiet plea:
The lawyers of The Estate of Percy Bysshe Shelly will be contacting you ..
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 27 Jun 1999 10:27:10 GMT
From: marcel.grunauer@lovely.net (Marcel Grunauer)
Subject: Re: Index of an array-item
Message-Id: <3776fc40.6751428@enews.newsguy.com>
On Sun, 27 Jun 1999 02:42:23 -0400, rjk@linguist.dartmouth.edu (Ronald
J Kimball) wrote:
>> > :I've got this array @items which contains a list of, well, items. Now I'd
>> > :like to known the index of, say, the item named "foo". Is there a nice
>> > :way to do this in Perl? (I'm quite sure there is, I just haven't found it
>> > :yet...)
>
>There's always more than one way to do it. Here's one, modified from
>the FAQ.
>
> @blues = qw/azure cerulean teal turquoise lapis-lazuli/;
> undef %is_blue;
> $i = 0;
> for (@blues) { $is_blue{$_} = $i++ }
>
>Now you check whether $some_color exists in %is_blue, and if so, what
>the associated value is. Simple.
Yet Another WTDI: Use the hash slice, Luke!
@arr = ('foo', 'bar', 'baz', 'yadda');
@tmp{@arr} = (0..$#arr);
foreach (keys %tmp) {
print "$_ => $tmp{$_}\n";
}
>Although it does get trickier (but still possible by extending the same
>suggested solutions) if you need to deal with duplicates...
True...
Marcel
------------------------------
Date: Sun, 27 Jun 1999 09:43:30 GMT
From: Mike Dichirico <mdichirico@lamotionpictures.com>
Subject: Re: Learning Perl exercises using reverse
Message-Id: <7l4ro2$kj4$1@nnrp1.deja.com>
In article <7l5n7i$9n3@news.cyber.net.pk>,
"Faisal Nasim" <swiftkid@bigfoot.com> wrote:
> Try this:
>
> print "Enter a string: ";
> chomp ( $str = <> );
> print reverse $str;
>
Thanks, Faisal.
--Mike
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 27 Jun 1999 11:07:05 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: NMake Dependency Generator
Message-Id: <7l50kp$5ol$1@gellyfish.btinternet.com>
On Sun, 27 Jun 1999 00:03:37 -0400 Kevin McClaning wrote:
> I'm new to Perl (just read "Perl for Dummies") so I'm quite the newbie
Dont do that - I think it is commonly held by those who know that using that
book to learn Perl is very likely to result in your remaining a Dummy.
You should take a gander at:
<http://reference.perl.com/query.cgi?books>
I wont recommend any book in particular because it gets embarrassing.
As to your actual question: I dont have a real answer beyond the suggestion
that you might take a look in the Perl source distribution to discover
how a 'make depend' is done under Win32 (if its done at all ...)
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 27 Jun 1999 10:15:18 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Novice asks: what's the equivalent perl command to #include "personalfile.h"
Message-Id: <3777f99b.3397550@news.skynet.be>
perldoc -f require
Bart.
------------------------------
Date: 27 Jun 1999 11:34:59 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Novice asks: what's the equivalent perl command to #include "personalfile.h"
Message-Id: <7l5293$5qm$1@gellyfish.btinternet.com>
On Sun, 27 Jun 1999 17:56:38 +0800 Sleiman wrote:
> The question is in the subject. Thanks for the response.
>
The only thing about that is that your subject is too long for some
newsreaders to display in full ...
Oh BTW you probably want to look at the entries in the perlfunc manpage for:
require
use
do
To see which will best suit your purposes.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 27 Jun 1999 17:56:38 +0800
From: Sleiman <ing-sol@hkisl.net>
Subject: Novice asks: what's the equivalent perl command to #include "personalfile.h"
Message-Id: <3775F556.181B74C5@hkisl.net>
The question is in the subject. Thanks for the response.
Sleiman
------------------------------
Date: 27 Jun 1999 10:25:08 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Trying to install Win32 Server ... error message...
Message-Id: <7l4u64$5ne$1@gellyfish.btinternet.com>
On Sun, 27 Jun 1999 01:52:43 -0400 Doug Crabtree wrote:
> Ok, I reinstalled everything and it seems to work. Some more problems...
>
> 1. Whenever I run a .pl file it hangs up my server (I can kill the perl.exe
> process and I get a CGI error message).
> 2. If I rename that .pl file to a .plx file (to use PerlIS.dll) it works
> perfect.
> 3. I removed all references to perl.exe in the system registry for .pl and
> replaced it with perlis.dll. It still calls perl.exe and still hangs.
>
Have you read what it says in the Win32 specific FAQ that is part of the
Activestate distribution about configuring various HTTP servers to work
with Perl ?
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 27 Jun 1999 08:29:37 -0400
From: "Doug Crabtree" <not@gonna.tell>
Subject: Re: Trying to install Win32 Server ... error message...
Message-Id: <7l55iv$sco$1@nntp9.atl.mindspring.net>
Jonathan Stowe <gellyfish@gellyfish.com> wrote...
> Have you read what it says in the Win32 specific FAQ that is part of the
> Activestate distribution about configuring various HTTP servers to work
> with Perl ?
Yes. This is where I made the change for .pl from perl.exe to perlis.dll.
It still loads perl.exe. It doesn't even matter if there is a file there or
not. I can come up with a dummy name that doesn't exist and the stupid
thing still loads perl.exe!
Strange...
Doug
------------------------------
Date: Sun, 27 Jun 1999 09:30:51 GMT
From: Mike Dichirico <mdichirico@lamotionpictures.com>
Subject: Re: using reverse in Learning Perl book
Message-Id: <7l4r0b$kcm$1@nnrp1.deja.com>
Please disregard this thread. Was having problems with deja.com and
ended up sending multiple posts of the same question to this usenet.
Wasn't my intention to ask you guys the same question a dozen times.
--Mike
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
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 6143
**************************************