I didn't say that Chetak's reply was wrong, or that he was somehow remiss in omitting 
that information.  It is, in the end, a somewhat philosophical difference, and as such 
I won't presume to try to change your mind, but let me clarify my point.
 
The OP was given a finished product.  I certainly won't disagree that he should have 
done some research and tried on his own, and there is no indication from the request 
that he did that.  But here's where we differ:  Regular expressions are quite possibly 
one the hardest part of learning effetive Perl programming,and arguably the most 
valuable.  Handing someone a finished regular expression without explaining how it 
works doesn't really help someone learn how to make their own regular expressions.  
The two references you mentioned would have been great suggestions as well.  What it 
comes down to is this:  If we're going to answer people's questions, then we should do 
it with an eye towards helping them learn the subject matter so that they can become 
self-sufficient.  If we feel like we're being asked for a freebie, then we have every 
right to say so and point them in a direction they should take before asking for a 
solution.  Breaking down a regex for a beginner is hardly giving away the magic, but 
if you'd rather point them towards some reference material that's fine.  But how 
exactly is a beginner supposed to know that 'perldoc perlretut' even exists unless you 
tell them?  The name isn't exactly intuitive, and most people have no idea what it is 
until you tell them or they start reading random parts of the perldoc in desperation.
 
To paraphrase the old saying:
 
A hungry man asked for a fish
 
He was given a fish
 
I suggested that maybe he should have been told how the fish was obtained
 
You maintained that if he really enjoyed the fish he was given and wanted another one 
bad enough, he would have gone out and found a book on fish and from there derived 
that fishing would have been the approprate way to get a fish, studied up on it and 
come back when he had problems fishing
 
 
-----Original Message----- 
From: Gunnar Hjalmarsson [mailto:[EMAIL PROTECTED] 
Sent: Mon 6/21/2004 6:18 AM 
To: [EMAIL PROTECTED] 
Cc: 
Subject: Re: split

Tim Johnson wrote:
> Chetak Sasalu wrote:
>>
>> $var =~ m/Owner: (\w{5})\s*: rwx \(all\)/;
>> $y = $1;
>
> That is one way to do it, but maybe you should tell him what it is
> that the regex does.  I remember from my newbie days that it wasn't
> too useful when people just threw regexes at me without explaining
> them because they look so daunting before you are used to them.

Chetak *could* have done so, but doing it is certainly nothing you can
claim that he *should* do. What *should* happen is that the OP ("Jack
Jack") start studying some appropriate documentation, such as


Reply via email to