[11875] in Perl-Users-Digest
Perl-Users Digest, Issue: 5475 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Apr 24 18:07:25 1999
Date: Sat, 24 Apr 99 15:00:17 -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           Sat, 24 Apr 1999     Volume: 8 Number: 5475
Today's topics:
    Re: Cant run perl scripts on Apache server on NT <cassell@mail.cor.epa.gov>
    Re: chomp-ing from the FRONT end (Abigail)
        Country of a visitor <selectthree@gsig-net.qc.ca>
    Re: Different between recurrence and looping <arh14@nospam.cornell.edu>
    Re: Different between recurrence and looping <complangc@eton.powernet.co.uk>
    Re: FAQ 4.15: How do I find yesterday's date? (Bernie Cosell)
    Re: FAQ 4.33: How do I find the soundex value of a stri <cassell@mail.cor.epa.gov>
    Re: Generating a unique string for order number <gellyfish@gellyfish.com>
    Re: How to make an array name to be a variable? <staffan@ngb.se>
    Re: How to make an array name to be a variable? <gellyfish@gellyfish.com>
    Re: Newbie regex query (Tad McClellan)
    Re: Perlscript on a winNT apache server isnt working <cassell@mail.cor.epa.gov>
    Re: Poker Program Help <cassell@mail.cor.epa.gov>
    Re: Poker Program Help <gellyfish@gellyfish.com>
        Problems with Netscape Enterprise on AIX bbeske@my-dejanews.com
        Problems with Netscape Enterprise on AIX bbeske@my-dejanews.com
    Re: QUESTION:Perl Regular Expression Subtring Matches?  <cassell@mail.cor.epa.gov>
    Re: Regular Expression help (Abigail)
    Re: Regular Expression help <jdf@pobox.com>
    Re: Regular Expression help ham@nospam.com
    Re: Telnet problems <bill@fccj.org>
    Re: What is the meaning of Perl module ? (Tad McClellan)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 24 Apr 1999 13:41:34 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Cant run perl scripts on Apache server on NT
Message-Id: <37222C7E.1F68B9FD@mail.cor.epa.gov>
Brent Michalski wrote:
> 
> agniora@usa.net wrote:
> >
> > when i try to point to a perl script on my apache server on NT platform, it
> > just displays the file as a text file instead of executing it. does anyone
> > know how i might be able to get my server to run perl scripts? thanks
> >
> > [snip of sig]
>
> Yes, you need to configure Apache to handle the scripts!
> 
> Go to:
> http://www.activestate.com/activeperl/docs/perl-win32/perlwin32faq6.html
> 
> and you will find all of the information you need.
> [snip of BIG sig]
Actually, you don't have to go that far.  Since you probably have
ActiveState Perl on your local machine, you can use your browser to
read the same article in your local HTML docs.  It's the
ActivePerl FAQ, section 'Web Server Config'.  Oddly enough.
HTH,
David
-- 
David Cassell, OAO                            cassell@mail.cor.epa.gov
Senior Computing Specialist                      phone: (541) 754-4468
mathematical statistician                          fax: (541) 754-4716
------------------------------
Date: 24 Apr 1999 20:15:16 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: chomp-ing from the FRONT end
Message-Id: <7ft8ok$jf3$1@client2.news.psi.net>
Abigail (abigail@fnx.com) wrote on MMLXII September MCMXCIII in
<URL:news:7ft6on$jbl$4@client2.news.psi.net>:
@@ mcti@my-dejanews.com (mcti@my-dejanews.com) wrote on MMLXI September
@@ MCMXCIII in <URL:news:7fqdh1$a72$1@nnrp1.dejanews.com>:
@@ ;; is there an easy way to do the same as "chomp" or "chop" but have it remove a
@@ ;; character from the FRONT end of a string, rather than the back end?
@@ 
@@ 
@@ chip() has once been proposed for such a function, but that never made it.
@@ 
@@ Use substr:
@@ 
@@    substr $str => 1, 0 = '';
That should of course be:
      substr $str => 0, 1 = '';
Abigail
-- 
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'
------------------------------
Date: Sat, 24 Apr 1999 16:05:44 -0400
From: selectthree <selectthree@gsig-net.qc.ca>
Subject: Country of a visitor
Message-Id: <37222417.3253@gsig-net.qc.ca>
Does anyone know the code to determine the origin country of a visitor
(or only it's code, like .com, .ca, .uk, .fr...)?
Please help me.
Pierre-Luc Soucy
------------------------------
Date: Sat, 24 Apr 1999 16:22:10 -0400
From: Aaron Hamid <arh14@nospam.cornell.edu>
Subject: Re: Different between recurrence and looping
Message-Id: <372227F2.C7087E80@nospam.cornell.edu>
Well, the *concept* of recurrence is important, regardless of whether it
can actually be emulated/implemented simply by clever iteration.  For
instance, the ansi C qsort routine (which is a Quicksort, which is
recursive), uses iteration, and a home-made stack, instead of recursive
function calls, for optimal efficiency.  The concept of recursion,
nevertheless is central to the algorithm.
Aaron
Erez Zuler wrote:
> 
> Basically, everything that can be done with recursive calls can be done also
> without recursive call.  Recursive calls uses less 'programmer' recourses in
> favor of system recourses.
> 
> Erez
> 
> Russell Harper wrote:
> 
> > I think you mean recursive call or recursion. There are cases where using
> > loop logic to solve a problem is much harder than by recursion. A well
> > known example is the Tower of Hanoi problem. With recursive logic, the
> > problem is trivial, I wouldn't attempt it with any other approach. Good
> > luck... /Russell
> >
> > Carfield Yim wrote:
> >
> > > It seen that looping can do the work of recurrence call, is there any
> > > different other than concept? Why do we need to study more?
------------------------------
Date: 24 Apr 1999 23:13:48 +0100
From: "Richard Heathfield" <complangc@eton.powernet.co.uk>
Subject: Re: Different between recurrence and looping
Message-Id: <01be8e9d$ef8a9900$0c000001@quenya>
Aaron Hamid <arh14@nospam.cornell.edu> wrote in article
<372227F2.C7087E80@nospam.cornell.edu>...
> Well, the *concept* of recurrence is important, regardless of whether it
> can actually be emulated/implemented simply by clever iteration.  For
> instance, the ansi C qsort routine (which is a Quicksort, which is
> recursive), uses iteration, and a home-made stack, instead of recursive
> function calls, for optimal efficiency.  The concept of recursion,
> nevertheless is central to the algorithm.
> 
Wow, what a huge cross-post! I hope the rest of the universe will forgive
me for pointing out that ANSI C qsort may be implemented via Quicksort and
it may not. The standard specifies only that the function shall sort, not
how it shall sort. IIRC it may use recursion, or it may not, and it may use
a stack, it may not. It's more or less up to the implementation, as long as
the interface is correct and the end result is right.
-- 
Richard Heathfield
The bug stops here.
------------------------------
Date: Sat, 24 Apr 1999 20:17:33 GMT
From: bernie@fantasyfarm.com (Bernie Cosell)
Subject: Re: FAQ 4.15: How do I find yesterday's date?
Message-Id: <372424f5.99047249@news.supernews.com>
Philip Newton <Philip.Newton@datenrevision.de> wrote:
} Bernie Cosell wrote:
} > 
} > This isn't quite correct.  There is an ugly-to-program-around problem
} > dealing with daylight savings time.  The problem is fairly limited: only
} > arises if you happen to be running your program right after midnight (local
} > time) of the day after the change *to* daylight savings time (so it is
} > daylight savings time now, but was *not* daylight savings time yesterday at
} > this time).  In that case, subtracting 24 hrs from the current time will
} > get you to right after 11PM *two*days*ago*, not -yesterday-.  Maybe an
} > algorithm that only fails for one hour per year is "close enough"...:o)
} - not everyone switches to/from DST at midnight. 2 am is also a popular
} time. When we had a similar thread a couple of weeks back, someone
} posted something showing when different countries switched. All sorts
} of times are actually popular.
It doesn't make any difference at all which actual hour is the official
time at which the clock is set forward or backward: the point is that
between midnight and 1AM, if the clock was set ahead *ANY*TIME* in the
previous 24 hrs, then when you go back 24 hrs you'll end up at 11PM
two-days-ago.  It doesn't have anything to do with when the clocks were
actually changed, but only that they _were_ changed.
  /Bernie\
-- 
Bernie Cosell                     Fantasy Farm Fibers
bernie@fantasyfarm.com            Pearisburg, VA
    -->  Too many people, too few sheep  <--          
------------------------------
Date: Sat, 24 Apr 1999 13:17:08 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: FAQ 4.33: How do I find the soundex value of a string?
Message-Id: <372226C4.3FA224B4@mail.cor.epa.gov>
Tom Christiansen wrote:
> 
>  [trim of header]
>   How do I find the soundex value of a string?
> 
>     Use the standard Text::Soundex module distributed with perl.
      But before you do so, you may want to determine whether
      `soundex' is in fact what you think it is.  Knuth's
      soundex algorithm compresses words into a small space,
      and so it does not necessarily distinguish between two
      words which you might want to appear separately.  For
      example, the last names `Knuth' and `Kant' are both mapped
      to the soundex code K530 .  If Text::Soundex does not do
      what you are looking for, you might want to consider the
      String::Approx module available at CPAN.
[And yes, Tom, I know you have an answer in perlfaq6 which points
to this module as well.  But I thought this was needed, given the
amount of confusion I have seen {mostly in other newsgroups} over
what `soundex' is.  Feel free to use, abuse, or s#!tcan this patch.]
David
-- 
David Cassell, OAO                            cassell@mail.cor.epa.gov
Senior Computing Specialist                      phone: (541) 754-4468
mathematical statistician                          fax: (541) 754-4716
------------------------------
Date: 24 Apr 1999 21:36:39 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Generating a unique string for order number
Message-Id: <7ftdh7$3eh$1@gellyfish.btinternet.com>
On 24 Apr 1999 19:51:25 GMT Abigail wrote:
> 
> One problem with creating unique number by concatting PID and time is having
> multiple machines. If in 3 months, you application is a success, but running
> it on one machine isn't going to work anymore, and it's decided that it's now
> going to be run on 5 machines, your "unique" numbers might no longer be unique
> 
OK I raise :
$" = '';
$niqid = "$$@{[localtime]}@{[`hostname`]}";
Admittedly one could get fancy with a random rotation on the hostname
I suppose ...
/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: Sat, 24 Apr 1999 22:37:34 +0200
From: Staffan Liljas <staffan@ngb.se>
Subject: Re: How to make an array name to be a variable?
Message-Id: <37222B8E.B4BFFB97@ngb.se>
David Cassell wrote:
> 
> Matthew O. Persico wrote:
> >
> > Staffan Liljas wrote:
> > > [big snip]
> > > Personally, I think hashes are gods greatest gift to the programmer. I
> > > love them. If I could turn my wife into one, I would.
> > >
> > > Staffan
> >
> > And just what does SHE think of this? :-)
> 
> I find that the phrase "What am I, chopped liver?" comes to mind at
> this moment...
Well, I just &kiss( $wife{ 'lips' } ) and she forgives me.
Staffan
------------------------------
Date: 24 Apr 1999 20:50:24 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How to make an array name to be a variable?
Message-Id: <7ftaqg$3de$1@gellyfish.btinternet.com>
On Sat, 24 Apr 1999 12:47:13 -0700 David Cassell wrote:
> Matthew O. Persico wrote:
>> 
>> Staffan Liljas wrote:
>> > [big snip]
>> > Personally, I think hashes are gods greatest gift to the programmer. I
>> > love them. If I could turn my wife into one, I would.
>> >
>> > Staffan
>> 
>> And just what does SHE think of this? :-)
> 
> I find that the phrase "What am I, chopped liver?" comes to mind at 
> this moment...
> 
Or for the Vegetarians amongst us that will be 'Quorn Mince' ...
/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: Sat, 24 Apr 1999 12:16:22 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Newbie regex query
Message-Id: <moqsf7.mk.ln@magna.metronet.com>
Thomas A. Bryan (tbryan@arlut.utexas.edu) wrote:
: Andy Elvey wrote:
: 123456789012345678901234567890123456789012345678901234567890123456789012
: > I've been having a go with regexes - in particular, using them to get
: > a simple derivative (calculus) script going.  I'm trying to get the 
: > code to take a very simple function like 7x3 (7 times "x" cubed) and 
: > return the derivative (21x2).
: I would have written this as 7x^3 and 21x^2.
   A Perl programmer would have used Perl's notation for exponentiation:
      7x**3 and 21x**2
   :-)
--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas
------------------------------
Date: Sat, 24 Apr 1999 13:43:55 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Perlscript on a winNT apache server isnt working
Message-Id: <37222D0B.FA597749@mail.cor.epa.gov>
agniora@usa.net wrote:
> 
> I am trying to run my perl script on winNT apache server, but the server just
> displays it as if it was a text file and does nothing about it.
>
> [snip of script and sig]
Please don't do this.  You just asked this same question, under a 
different subject line, with different text, only half an hour earlier.
And your question has been answered in the other thread.
David
-- 
David Cassell, OAO                            cassell@mail.cor.epa.gov
Senior Computing Specialist                      phone: (541) 754-4468
mathematical statistician                          fax: (541) 754-4716
------------------------------
Date: Sat, 24 Apr 1999 13:04:33 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Poker Program Help
Message-Id: <372223D1.B3FD50D1@mail.cor.epa.gov>
Jarhead0 wrote:
> 
> I would love to hear any advice on how to rank hands for a game of seven
> card stud. I have all the cards sorted by name, suit, and value, but cant
> seem to come up with a good method of determaning which hand is the best. I
> have it working fine for 5 card, but 7 is kicking my butt!
Okay, I'm going to take a wild guess and assume you're asking here
because you're writing your program in Perl.
But unless the issue is one of problems with the implementing Perl
code [and I assume it is not, since you didn't show us any code or 
ask about that], then it is not an appropriate question for this 
newsgroup.  It appears to be a `gaming' problem disguised in a
llama`s coat.
Perhaps someone in one of the rec.games.* hierarchy might be able
to tell you want you want to know.
HTH,
David
-- 
David Cassell, OAO                            cassell@mail.cor.epa.gov
Senior Computing Specialist                      phone: (541) 754-4468
mathematical statistician                          fax: (541) 754-4716
------------------------------
Date: 24 Apr 1999 21:47:29 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Poker Program Help
Message-Id: <7fte5h$3ek$1@gellyfish.btinternet.com>
On Sat, 24 Apr 1999 13:04:33 -0700 David Cassell wrote:
> Jarhead0 wrote:
>> 
>> I would love to hear any advice on how to rank hands for a game of seven
>> card stud. I have all the cards sorted by name, suit, and value, but cant
>> seem to come up with a good method of determaning which hand is the best. I
>> have it working fine for 5 card, but 7 is kicking my butt!
> 
> Okay, I'm going to take a wild guess and assume you're asking here
> because you're writing your program in Perl.
> 
> But unless the issue is one of problems with the implementing Perl
> code [and I assume it is not, since you didn't show us any code or 
> ask about that], then it is not an appropriate question for this 
> newsgroup.  It appears to be a `gaming' problem disguised in a
> llama`s coat.
> 
> Perhaps someone in one of the rec.games.* hierarchy might be able
> to tell you want you want to know.
> 
Or alternatively :
"I'd love to see somebody implement this in Perl - However I dont
understand the rules you outline please show us the code that you have
tried and have found not to work" ..
/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: Sat, 24 Apr 1999 20:48:19 GMT
From: bbeske@my-dejanews.com
Subject: Problems with Netscape Enterprise on AIX
Message-Id: <7ftamj$m9p$1@nnrp1.dejanews.com>
We have a perl script running under Netscape Enterprise 3.5.1 on an RS6000
 under AIX 4.2.1. When we access a perl script that calls a C program, the
status code returned from the call is always -1.
Example:
PERL Program:
    #!/usr/local/bin/perl
     use CGI;
     $query = new CGI;
     print $query->content();
     print $query->start_html();
     $a = system( 'test_c.exe' );
     $b = $a/256;
     print "A = $a<br>\n";
     print "B = $b<br>\n";
     print $query->end_html();
C Program:
     main() {
         exit( 5 );
     }
Running test.pl at the shell level on NT and AIX returns
A= 1280, B=5
Netscape fastrack V2.01 on AIX yeilds the same results.
Running Enterprise 3.5.1 on NT yeilds the same.
Under Netscape Enterprise 3.5.1 on AIX I get:
A=-1, B=-0.00369
Anybody have any ideas what's up?
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    
------------------------------
Date: Sat, 24 Apr 1999 20:48:17 GMT
From: bbeske@my-dejanews.com
Subject: Problems with Netscape Enterprise on AIX
Message-Id: <7ftamh$m9o$1@nnrp1.dejanews.com>
We have a perl script running under Netscape Enterprise 3.5.1 on an RS6000
 under AIX 4.2.1. When we access a perl script that calls a C program, the
status code returned from the call is always -1.
Example:
PERL Program:
    #!/usr/local/bin/perl
     use CGI;
     $query = new CGI;
     print $query->content();
     print $query->start_html();
     $a = system( 'test_c.exe' );
     $b = $a/256;
     print "A = $a<br>\n";
     print "B = $b<br>\n";
     print $query->end_html();
C Program:
     main() {
         exit( 5 );
     }
Running test.pl at the shell level on NT and AIX returns
A= 1280, B=5
Netscape fastrack V2.01 on AIX yeilds the same results.
Running Enterprise 3.5.1 on NT yeilds the same.
Under Netscape Enterprise 3.5.1 on AIX I get:
A=-1, B=-0.00369
Anybody have any ideas what's up?
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    
------------------------------
Date: Sat, 24 Apr 1999 13:37:52 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: c_graham@hinge.mistral.co.uk
Subject: Re: QUESTION:Perl Regular Expression Subtring Matches? Strange  Behaviour...
Message-Id: <37222BA0.1067403@mail.cor.epa.gov>
[courtesy cc: mailed to poster]
Craig Graham wrote:
> 
> Eric Bohlman wrote:
> >
> > Craig Graham <c_graham@hinge.mistral.co.uk> wrote:
> > : When I came to code the regex processor, I noticed this behaviour
> > : from Netscape - and when I checked with Perl, that's the same:
> >
> > :   $_=aibajbccc;
> >
> > :   /(a.b)+c+/;
> >
> > :   print("$_\n");
> > :   print("$& $1 $2 $3\n");
> >
> > : This gives a result of $&="aibajbccc" as I would expect.
> > : But it only gives the first substring match $1="aib", even though
> > : I would have expected (a.b)+ to imply multiple substring matches
> > : (indeed it does in the final match $&, where both substring matches
> > : "aib" and "ajb" appear). If substring's are matched and processed into
> > : the final match, how come only the first is actually returned on it's
> > : own?
> >
> > Each $n variable corresponds to a physical pair of parentheses.  Since
> > your regex has only one pair of parentheses, $2 and $3 are not going to
> > be touched.  If there's a quantifier (such as '+') after a pair of
> > parenthesis, only the last match is recorded.
> 
> Ok, it's not quite what I would have expected (excuse my ignorance
> here), as intuitively I'd have expected the + to extend to include 1 or
> more substrings - it seems me to be an inconsistency in the
> syntax/semantics
> that it doesn't (I'm sure this has been discussed a hundred times
> before).
Craig, I think that you are expecting (a.b)+ to match this:
((a.b)+)
where $1 would hold the matched material from the outer parens, and
$2 would match what is in the inner parens.
Do you see the difference?  The parens around (a.b) capture something..
but that something can only be three characters long [or nothing, if
there were no match].
So it's not an inconsistency in the syntax.  But it may be different
from what you are used to.  Still, any good regex package should only
match three characters there.  That's all your parens surround at
any time.
And I seriously wonder if Netscape's pattern-matching should be held
up as any sort of standard for programming languages to aspire to.  :-)
David
-- 
David Cassell, OAO                            cassell@mail.cor.epa.gov
Senior Computing Specialist                      phone: (541) 754-4468
mathematical statistician                          fax: (541) 754-4716
------------------------------
Date: 24 Apr 1999 20:18:14 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Regular Expression help
Message-Id: <7ft8u6$jf3$2@client2.news.psi.net>
ham@nospam.com (ham@nospam.com) wrote on MMLXII September MCMXCIII in
<URL:news:3721F907.CD12558D@nospam.com>:
## I have a string in a key-value format.
## 
## Here's the format:
## 
## key=value,key=value,key=value (no comma at the end)
## 
## I'd like to extract just the data before the = sign (key).  I know I can
## 
## use the split(), look for a pattern match (=value) and place the
## unmatched values(key) in an array.
## 
## Data after the = sign can contain just about any character, including
## the following:
## 
##     ; : - _ / \ \s
No problem. As long as it can't contain a ,:
       split /=[^,]*,?/
Abigail
-- 
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi
------------------------------
Date: 24 Apr 1999 17:08:36 -0400
From: Jonathan Feinberg <jdf@pobox.com>
To: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Regular Expression help
Message-Id: <m34sm5vi97.fsf@joshua.panix.com>
Jonathan Stowe <gellyfish@gellyfish.com> writes:
> my %hash = map { split /=/ } split /,/ , $in_string;
  my %hash = split /[=,]/, $in_string;
-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: Sat, 24 Apr 1999 16:58:39 -0400
From: ham@nospam.com
Subject: Re: Regular Expression help
Message-Id: <3722307F.A58FC856@nospam.com>
Works great.  Thanks
Jonathan Stowe wrote:
> On Sat, 24 Apr 1999 13:01:59 -0400 ham@nospam.com wrote:
> > I have a string in a key-value format.
> >
> > Here's the format:
> >
> > key=value,key=value,key=value (no comma at the end)
> >
> > I'd like to extract just the data before the = sign (key).  I know I can
> >
>
> Just one split more :
>
> #!/usr/bin/perl -w
>
> use strict;
>
> my $in_string = 'key1=value1,key2=value2,key3=value3,key4=value4';
>
> my %hash = map { split /=/ } split /,/ , $in_string;
>
> foreach ( keys %hash )
> {
>    print "$_ = $hash{$_}\n";
> }
>
> You like ?
>
> /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: Sat, 24 Apr 1999 17:11:03 -0400
From: "Bill Jones" <bill@fccj.org>
Subject: Re: Telnet problems
Message-Id: <3722335b.0@usenet.fccj.cc.fl.us>
In article <7fpr2t$o79$1@nnrp1.dejanews.com>, scott@sboss.net wrote:
> 
> Here is some of the code I have tried....
>
>
> #!/usr/bin/perl -w # $|=1; $login="root"; $pass='password is removed'; use
Are you sure you can login as root over a TTY on your system?
(Normally you can't by default.)
Refer to the /etc/securetty file to be sure.
HTH,
-Sneex-  :]
______________________________________________________________________
Bill Jones  Data Security Specialist  http://www.fccj.org/cgi/mail?dss
         Jacksonville Perl Mongers
         http://jacksonville.pm.org
         jax@jacksonville.pm.org
         Running LinuxPPC RedHat 5.0 (Hurricane)
       __ _                     http://www.linuxppc.org
      / /(_)_ __  _   ___  __   http://www.apache.org
     / / | | '_ \| | | \ \/ /   http://www.redhat.com
    / /__| | | | | |_| |>  <    http://www.perl.com
    \____/_|_| |_|\__,_/_/\_\   http://www.gimp.org
------------------------------
Date: Sat, 24 Apr 1999 12:18:47 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: What is the meaning of Perl module ?
Message-Id: <7tqsf7.mk.ln@magna.metronet.com>
Austin Ming (austin95002887@yahoo.com) wrote:
: What is the meaning of Perl module ?
   "module" is Perl's name for what other languages usually
   call "libraries".
   Read all about it in the perlmod.pod file that is already
   installed on your hard disk somewhere.
--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas
------------------------------
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 5475
**************************************