[18092] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 252 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Feb 9 00:08:44 2001

Date: Thu, 8 Feb 2001 21:05:11 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <981695111-v10-i252@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 8 Feb 2001     Volume: 10 Number: 252

Today's topics:
    Re: alt.perl and correctness (was Re: hex to binary con (Eric Bohlman)
    Re: Can perl define vars dynamically? (Mark Jason Dominus)
    Re: capturing diagnostics <peter.sundstrom-eds@eds.com>
    Re: capturing diagnostics (Mark Jason Dominus)
    Re: Cron task [more] (Michael Long)
    Re: getting date from Week number (Richard J. Rauenzahn)
    Re: Need Help Checking IP Address Syntax w/ PERL? (Mark Jason Dominus)
    Re: non repeating random numbers georgebailey@my-deja.com
    Re: Perl DBI newbie question ... <tlav1@earthlink.net>
    Re: Perl DBI newbie question ... <permission2@home.com>
        perlbug <joegottman@worldnet.att.net>
    Re: Regular Expression Question (David H. Adler)
    Re: Setting Cookie Expiration Date with Perl <troyr@vicnet.net.au>
    Re: sort of about sort (Tad McClellan)
    Re: Specifying the length of regular expression (Mark Jason Dominus)
    Re: splitting a string on the / character (Mark Jason Dominus)
    Re: splitting a string on the / character (Mark Jason Dominus)
    Re: splitting a string on the / character (Damian James)
    Re: This is driving me nuts and I need a guru (David H. Adler)
    Re: Using regex to match numbers (not digits)? (Tad McClellan)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 9 Feb 2001 03:17:52 GMT
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: Re: alt.perl and correctness (was Re: hex to binary conversion ? Please help)
Message-Id: <95vnh0$qu4$1@bob.news.rcn.net>

Peter J. Acklam <jacklam@math.uio.no> wrote:
> I was not referring to "bad questions", "RTFM" and "that's
> offtopic" posts.  Such posts are legitimate.  Add the appropriate
> amount of sarcasm and they can even be quite amusing.

> I was referring to posts where one poster is doing nothing but
> attacking another.  I get tired of reading about certain posters'
> personal problems with other posters here.  Sure, some people

I can only assume that you're talking about exchanges with the energy 
creature, and they're a special case because s/h/it gets its jollies out 
of giving extremely misleading advice to people ("newbies") who don't yet 
have the background to realize that they're being led astray.  While 
ignoring trolls is usually a Good Thing, it doesn't really work when we 
have someone whose goal is, for reasons known only to him/herself, to help 
novices become poor programmers.  This particular battle needs to be 
fought, but fortunately a simple killfile can shield you from most if not 
all of the collateral damage.

I think Randal was implying, correctly, that if this group seems to have a 
large number of rude postings, the main reason is that it has a large 
number of postings, period, and it's a basic principle of probability that 
large groups have more rare events than smaller ones.  And as Tad pointed 
out, the more crowded a group is, the lower the threshold of annoyance and 
the greater the need to observe protocol.  Cutting in line is much more of 
a problem in a place like Disneyland than it is in your typical 
street-corner summer carnival, and thus the penalties are going to be 
greater.



------------------------------

Date: Fri, 09 Feb 2001 02:28:13 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: Can perl define vars dynamically?
Message-Id: <3a8355bc.6a1c$ce@news.op.net>

In article <95v90f$jrt$1@nnrp1.deja.com>,
 <michael.cambray@wellpoint.com> wrote:
>Global symbol "sepf" requires explicit package name at huh1 line 31 (#1)
>    (F) You've said "use strict vars", which indicates that all
>variables
>    must either be lexically scoped (using "my"), or ...

Yeah.  You're trying to use @sepf, and you never declared it.  Add

        my @sepf;

near the other 'my' line.

>IS IT THAT I'M DOING SOMETHING WRONG,

Yes, you're doing something wrong.
-- 
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print


------------------------------

Date: Fri, 9 Feb 2001 14:17:59 +1300
From: "Peter Sundstrom" <peter.sundstrom-eds@eds.com>
Subject: Re: capturing diagnostics
Message-Id: <95vgg8$6bi$1@hermes.nz.eds.com>


"Ted Fiedler" <tfiedler@zen.moldsandwich.com> wrote in message
news:Pine.BSO.4.32.0102081835070.25950-100000@zen.moldsandwich.com...
> how would I capture the output when use diagnostics; is used? It runs
> several screen lengths and have tried prog.pl > 1  and prog.pl | less
> and others. what am i missing?

prog.pl 2>errorlog

or

prog.pl 2>&1 | less




------------------------------

Date: Fri, 09 Feb 2001 03:00:01 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: capturing diagnostics
Message-Id: <3a835d30.6aeb$280@news.op.net>


In article <Pine.BSO.4.32.0102081835070.25950-100000@zen.moldsandwich.com>,
Ted Fiedler  <tfiedler@zen.moldsandwich.com> wrote:
>how would I capture the output when use diagnostics; is used? It runs
>several screen lengths and have tried prog.pl > 1  and prog.pl | less
>and others. what am i missing?

Every program has two output streams, called STDOUT and STDERR.
Erorrs go to STDERR; normal output goes to STDOUT.

The purpose of that is that you can redirect the normal output of your
program using > or |, but the errors will still appear on the
terminal; this is usually a feature.  For example, with "prog.pl |
filter" you don't usually want the error message to go into the filter
program, because they might confuse it.

In this case you do want to redirect STDERR.  To do that, use

        prog.pl >file  2>&1 

or

        prog.pl >&file 

Which one is correct depends on which shell you use; use the first
one for sh or bash, the second for csh or tcsh.  If in doubt, try both
and use the one that works.

Similarly:

        prog.pl 2>&1 | less
or
        prog.pl |& less

depending.        

Hope this helps.

-- 
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print


------------------------------

Date: Fri, 09 Feb 2001 04:03:45 GMT
From: mlong@spamnot.infoave.net (Michael Long)
Subject: Re: Cron task [more]
Message-Id: <3a836bf1.86878597@news3.infoave.net>


system("script2.pl");

or

$status=`script2.pl`;

or

open(PROG,"script2.pl |");
close(PROG);

On 1 Feb 2001 14:03:03 -0000, jean@ematic.com wrote:

>On Thu, 01 Feb 2001, "TAPmaster" <thetap@home.com> wrote:
>>You could call the 2nd from your first when it was done running.
>
>
>heu... yes, but how to do ? Sorry, perl is a new language for me, and I am
>lost in the manual :-(
>
>Thanks..
>Jean
>
>><jean@ematic.com> wrote in message
>>news:8B4XJ0LH36923.4302430556@frog.nyarlatheotep.org...
>>> First, thanks to all who helped me, that's okay now.
>>>
>>> Something more in a cron task: I want run 2 scripts, but the second one
>>> right after the first has been completed.
>>> The first script never runs the same time, as it is some checks, and
>>> duration is never the same.
>>>
>>> So how can I do to run the second JUST after the first ends ? Of course I
>>> could make it to run for example 3 hours after the first, as I am sure the
>>> the 1st will have been completed. But it's not a nice job :-)
>>>
>>> Thanks a lot,
>>>
>>> Jean
>>>
>
>
>
>
>
>
>
>
>



------------------------------

Date: 8 Feb 2001 22:36:22 GMT
From: nospam@hairball.cup.hp.com (Richard J. Rauenzahn)
Subject: Re: getting date from Week number
Message-Id: <981671781.122979@hpvablab.cup.hp.com>

mike_solomon@lineone.net writes:
>Using Date::Calc I can get a Week number by providing a date
>
>($week,$year) = Week_of_Year($year,$month,$day);
>
>I want to provide the Week number and the Year and get the Week
>Commencing date
>
>So if I provide week 3 year 2001 I want to get back 15/01/2001
>
>Does anyone have any idea how this could be done?

Calculate it yourself...

#!/usr/bin/perl -w
use strict;
use Date::Calc qw(:all);


my $week = 3;

my @date = Monday_of_Week(1, 2001);
@date = Add_Delta_Days(@date, 7*($week-1));

print "@date\n";

__END__

Rich
-- 
Rich Rauenzahn ----------+xrrauenza@cup.hp.comx+ Hewlett-Packard Company
Technical Consultant     | I speak for me,     |   19055 Pruneridge Ave. 
Development Alliances Lab|            *not* HP |                MS 46TU2
ESPD / E-Serv. Partner Division +--------------+---- Cupertino, CA 95014


------------------------------

Date: Fri, 09 Feb 2001 02:22:31 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: Need Help Checking IP Address Syntax w/ PERL?
Message-Id: <3a835466.6a03$2ec@news.op.net>
Keywords: Biometrika, cannot, embellish, quadriceps


In article <cxc3ddq4n9t.fsf@janus.uio.no>,
Peter J. Acklam <jacklam@math.uio.no> wrote:
>If you want a regex-only approach, you can use
>
>    sub isip {
>        local $_ = shift;
>        / \A
>                 (?: [0-1]?[0-9]?[0-9] | 2[0-4][0-9] | 25[0-5] )
>          (?: \. (?: [0-1]?[0-9]?[0-9] | 2[0-4][0-9] | 25[0-5] ) ) {3}
>          \z
>        /x;
>    }

If you're going to go to that much trouble (which I don't recommend
anyway) it seems to me that you should do something more like this:

         / \A
                  (?: [0-1]?[0-9]?[0-9] | 2[0-1][0-9] | 22[0-3] )
           (?: \. (?: [0-1]?[0-9]?[0-9] | 2[0-4][0-9] | 25[0-5] ) ) {3}
           \z
         /x;


because it's pretty unlikely that a class D or class E address is
actually valid.

-- 
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print


------------------------------

Date: Fri, 09 Feb 2001 02:31:55 GMT
From: georgebailey@my-deja.com
Subject: Re: non repeating random numbers
Message-Id: <95vkqr$tfg$1@nnrp1.deja.com>

In article <t85r8bdh2t8v2b@news.supernews.com>,

The bit that puzzles the hell out of me is this:

$asked = "1:2:3:4:";
@sked = split(/:/,$asked) ;

why are you using a scalar and splitting it into an array when an array
is all you want in the first place?

This seems like a terrible simple problem to me -- where you went wrong
is saying "I need help with my problem" when what you meant was "I want
help figuring out why my solution to the problem didn't work"

My solution to the problem, roughly the way you approach it, is to have
a list of all the numbers chosen already, say it's called

     @chosenalready

and have a subroutine like this:

sub isNew($yournumber){
$IsNew = 1;
for($i=0;$i<length(@chosenalready);$i++){
	if($yournumber == chosenalready[$i]){
	$IsNew = 0;
		    }
		}
		return $IsNew;
}

and run this for each number, so that you just go

     if IsNew($number)

to get a true or a false.

A true means getting a new random number, and a false means you can
continue, so you can just do

      until IsNew($number)

and when it registers a false, put the number into the "chosen already"
array and continue.

I'm not saying this is the way to solve the problem, I'm saying this is
a sensible way to solve it, approached as you approached it.


--
~~ ...and dance by the light of the moon


Sent via Deja.com
http://www.deja.com/


------------------------------

Date: Fri, 09 Feb 2001 03:05:16 GMT
From: buck_wing <tlav1@earthlink.net>
Subject: Re: Perl DBI newbie question ...
Message-Id: <tlav1-C403E0.22073108022001@news.earthlink.net>

In article <I4ng6.112589$g6.50011773@news1.elmhst1.il.home.com>, "Joe 
Halbrook" <permission2@home.com> wrote:

> I was curious about something:
> 
> When I run my script using telnet it works fine.
> When I call it from a browser, which loads a
> pop-up window, then does some DBI stuff,
> the pop-up works fine, but the DBI stuff blows.
> 
> Do I have to do something special when calling
> the script from a browser?
> 
> Code ...
> 
>   use DBI;
> 
>   $agent              = "$ENV{'HTTP_USER_AGENT'}";
>   $remote           = "$ENV{'REMOTE_ADDR'}";
>   $ref                   = "$ENV{'HTTP_REFERER'}";
> 
>   my $database_name     = $db;
>   my $location                    = "12.34.56.789";
>   my $port_num                 = "3306";
>   my $database                 =
> "DBI:mysql:$database_name:$location:$port_num";
>   my $db_user                   = "user";
>   my $db_password          = "pswd";
> 
>   my $dbh               = DBI->connect($database,$db_user,$db_password);
> 
>   my $sth               = $dbh->prepare("INSERT INTO ct$table
>                                   (ctDate,hostID,userAgent,ipAddr,refURL)
>                                   VALUES
> (NULL,'$host','$agent','$remote','$ref')");
> 
>   $rows                 = $sth->execute();
> 
>   $sth->finish();
>   $dbh->disconnect();
> 
>   exit(0);
> 
> Thank you, in advance for your help!
> 
> Joe
> 
> 
> 

At first glance, it seems that the header is missing.  Before you print 
something to the browser, you must tell the browser what's coming.  Put 
in this line...

print "Content-type: text/html\n\n";

 ...before you print anything to the browser.  Don't forget the two 
newlines at the end or you'll continue to have problems.

buck


------------------------------

Date: Fri, 09 Feb 2001 04:43:16 GMT
From: "Joe Halbrook" <permission2@home.com>
Subject: Re: Perl DBI newbie question ...
Message-Id: <EzKg6.114388$g6.50946492@news1.elmhst1.il.home.com>

Bob,

I added rights to Insert, Update, and Select on for user:  nobody.
I then changed the user to nobody (with assoc. password) in my DBI code,
and even stopped, and restarted the mySQL server, to no avail.

I also tried error checking (RaiseError) and turned on trace, but neither
of these reveal any errors.  It's like the DBI code is totally ignored in
the Perl code when running it as a CGI script, though running it from
telnet works fine.

I've tried mimicing the same logic in PHP and it works fine, there.
However, I have a major investment in Perl for the application I'm
upgrading, and cannot afford the time to rewrite in PHP.

Still looking for any ideas out there ......  Thanks!

Joe


Bob Walton <bwalton@rochester.rr.com> wrote in message
news:3A8217B8.59B64A12@rochester.rr.com...
> > Joe
> Well, when your code is run as a CGI script (which is probably what you
> mean when say "run the script from a brower") the "user" under which it
> is running is probably set to a different directory (it will be a
> directory specified by your web server setup), and the database software
> then can't find the database.  Try using the absolute file name.
> Depending on your OS, you may also have to adjust the permissions of the
> database file so the "user" the web server runs it under has read/write
> permission.
> --
> Bob Walton




------------------------------

Date: Fri, 09 Feb 2001 02:25:28 GMT
From: "Joseph Gottman" <joegottman@worldnet.att.net>
Subject: perlbug
Message-Id: <syIg6.5367$Nj5.238172@bgtnsc07-news.ops.worldnet.att.net>

I have been trying to report a bug, and every time I send an e-mail to
perlbug@perl.com, it bounces back two or three days later.  How should I
report the bug?

Joe Gottman




------------------------------

Date: 9 Feb 2001 04:00:33 GMT
From: dha@panix6.panix.com (David H. Adler)
Subject: Re: Regular Expression Question
Message-Id: <slrn986qr1.i9r.dha@panix6.panix.com>

On 8 Feb 2001 23:16:34 GMT, Damian James <damian@qimr.edu.au> wrote:
>
>Note that the OP wanted to test the length of the _match_, not the line.
>DHA's solution in this thread did this.

/me bows

Nevertheless, I yield to ETB for the solution in the painful
category. :-)

dha

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
"Shrink your opponents' heads before they shrink yours!" - The
Bomboras


------------------------------

Date: Fri, 9 Feb 2001 13:04:43 -0800
From: "Troy Boy" <troyr@vicnet.net.au>
Subject: Re: Setting Cookie Expiration Date with Perl
Message-Id: <bgIg6.175$FU5.4865@ozemail.com.au>

> >I am trying to set a variable for cookie expiration dates.  The amount of
> >time in the future will be x number of days from the date that the cookie
is
> >set.  I found some helpful postings at deja.com but am having a little
> >trouble with the correct formatting for the date.  The relevant parts of
the
> >script follow:
>
> Have you looked at the Perl CGI module's documentation for cookies?  You
> don't have to compute an exact GMT date, you can specify relative dates.

Speakin of cookies did you ever have troubles with getting cookies to work
on IE 5.5?
My scripts which contained cookies seemed to die on that version of IE





------------------------------

Date: Fri, 09 Feb 2001 03:54:24 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: sort of about sort
Message-Id: <slrn986ik6.cpv.tadmc@tadmc26.august.net>

JMT <ccx138@coventry.ac.uk> wrote:
>Just for interest why wasn't sort implemented so you could use it like
>the UNIX sort.


Because that would be limiting. It can do what sort(1) does
(sans the disk file/merge sort thing), plus some more.


>e.g. sort -n @array; to sort numerically. 


Perl's sort() _does_ have that feature, but we spell "-n" as "{$a <=> $b}".


>even sort -nr to reverse a
>numeric sort.


That we spell "{$b <=> $a}".


>It would seem to make sense because most of the time you either want to
                                     ^^^^^^^^^^^^^^^^
>sort in alpha order or numeric.


But other times you don't.


>Without wanting to change the language is this something that could be
>perl 6 ?


I hope not. I want to be able to sort my way all of the time,
not merely most of the time.

Besides we can already do what needs doing, no new feature needed.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: Fri, 09 Feb 2001 02:34:17 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: Specifying the length of regular expression
Message-Id: <3a835728.6a41$378@news.op.net>

In article <95v3pv$fhp$1@nnrp1.deja.com>,  <bonjaa@my-deja.com> wrote:
>How can I write a regular expression for the following:

That is what we call the Wrong Question.

>One or more A followed by zero or more B followed by one or more C,
>with the total length (all A's + B's + C's) greater than 10?

How about:

      if ($string =~ /(A+B*C+)/ && length($1) > 10) { ... }

Or is that too straightforward?  

-- 
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print


------------------------------

Date: Fri, 09 Feb 2001 02:50:00 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: splitting a string on the / character
Message-Id: <3a835ad7.6ab1$df@news.op.net>

In article <slrn9843cc.l7g.damian@puma.qimr.edu.au>,
Damian James <damian@qimr.edu.au> wrote:
>>My point is that a lot of "helpful" replies seem to just be "read the man
>>pages". That is not helpful...
>
>On the contrary, pointing out exactly which man page to read is
>considerably more helpful than giving a simple solution. 

I disagree.  In my experience people are a lot more likely to follow a
suggestion to read the manual *after* you tell them the answer.  By
giving real help, you establish yourself as a helpful person whose
advice can be trusted.  When you tell someone that the answer lies
somewhere in a highly technical 8000-word document ("But I won't tell
you where, nyaaah!) you're just being a jerk.

>but that they don't know HOW to work it out. Pointing to the
>appropriate man page shows them how.

That's a nice theory, but I don't think it has very much to do with
human nature.  People can be led much more easily than they can be driven.

And you may have forgotten, but reading the manual is an acquired
skill; nobody comes out of the womb knowing how to read documentation.
A lot of these people *can't* read it, because they don't know how
yet; it's useless to pretend that they can.

>
>I guess you missed the voluminous thread last week about fish and fishing?

I think this 'fish' thing is bullshit.

If you give the guy a fish, he might stop panicking about whether
he'll go hungry or not.  Then eventually he'll wonder where you're
getting all those fish.  Then he'll be a lot more receptive to fishing
lessons than if you had just said "Go learn to fish and stop bothering
me, you lazy bastard!"

I think RTFM-ism is mostly unkind and unhelpful, masquerading behind a
rhetoric of helpfulness.  If your goal is to get people to wash their
hands of you and go away to use another language with a more
supportive community, it's a great idea.




-- 
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print


------------------------------

Date: Fri, 09 Feb 2001 02:54:27 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: splitting a string on the / character
Message-Id: <3a835be2.6ac7$8d@news.op.net>

In article <Pine.LNX.4.30.0102090054230.22440-100000@lxplus003.cern.ch>,
Alan J. Flavell <flavell@mail.cern.ch> wrote:
>You're telling them not to get out of diapers yet?  I would find that
>insulting.

I doubt you would, or that you have.  

If you really believe that people who come here asking simple
questions will find it insulting if we give them simple answers, then
you need to take a vacation or something; that's utterly warped.

-- 
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print


------------------------------

Date: 9 Feb 2001 03:45:35 GMT
From: damian@qimr.edu.au (Damian James)
Subject: Re: splitting a string on the / character
Message-Id: <slrn986puq.giv.damian@puma.qimr.edu.au>

Thus spake Mark Jason Dominus on Fri, 09 Feb 2001 02:50:00 GMT:
>Damian James <damian@qimr.edu.au> wrote:
>>...pointing out exactly which man page to read is
>>considerably more helpful than giving a simple solution. 
>
>I disagree.  In my experience people are a lot more likely to follow a
>suggestion to read the manual *after* you tell them the answer. By
>giving real help, you establish yourself as a helpful person whose
>advice can be trusted. 

Actually, I agree with you and have tried to approach my posts here in this
way. I'm relatively new to usenet, and I'm sure I've made a fool fo myself
at least a couple of times, but I really have tried to err away from pure 
RTFM. Generally I'm happier to seem a fool than a bastard.

This may be inconsistent with what I said above, but I only claim to try to
be consistent. I readily acknowledge I don't always succeed. 

>When you tell someone that the answer lies
>somewhere in a highly technical 8000-word document ("But I won't tell
>you where, nyaaah!) you're just being a jerk.
>

I really hope I haven't done this here. But I DO think that any tidbit of
simple help must be accompanied by a RTFM reference if it's to do any
good. Certainly I have made a fool of myself here exactly by failing to
read part of the manual properly. But I believe I have always tried to
answer questions directly, as well as pointing out other paths to try.

>...
>
>And you may have forgotten, but reading the manual is an acquired
>skill; nobody comes out of the womb knowing how to read documentation.
>A lot of these people *can't* read it, because they don't know how
>yet; it's useless to pretend that they can.
>

I think the point I was trying to make is that it is necessary to convey
the idea that learning this skill is as important as learning any other
skill when becoming acquainted with Perl. It is one of the core personal
commitments and can't be skipped. 

>>
>>I guess you missed the voluminous thread last week about fish and fishing?
>
>I think this 'fish' thing is bullshit.
>...

I was only attempting to draw attention to that thread without comment. I
actually find that whole analogy to smell of something like a 17th century
Jesuit self-justifying mission civilatrix. Rather too smug for me, though
like any analogy, useful for making a point. The point that people seem to
be making is that handing out a fish encourages the recipient to turn up
for another tomorrow (with his friends). 

I can see I've made a fool of myself here again, and beg the indulgence of
others to point out the transparency of my intentions -- every post I make
in response to a question is an advance payment for the time I have
to ask a question here myself. 

I am an absolute novice, compared with you, MJD, and with many of
the other regulars here. I usually do defer to the more experienced,
though I feel I may save someone's time by contributing where I can. 

Hoping this IS the right thing to do,

Cheers,
Damian
-- 
$;=ord$%,$:=$;-ord q,.,,$_=q 13346:3366:3276:3326:3386:546:566:966:3396:3376:1.
q 73386:546:;96:3326:3336:3386:3266:3236:3366:546::26:3236:3366:32:6:546:32667.
q,:;96:;;6:3296:3236:3366:326:56,,s,.,;ord($&)-$:-$;;;;;,eg,s,$;,;chr$&-$:;,eg,
eval eval;               #requires 5.6.0 ## my first attempt at one of these...


------------------------------

Date: 9 Feb 2001 04:08:10 GMT
From: dha@panix6.panix.com (David H. Adler)
Subject: Re: This is driving me nuts and I need a guru
Message-Id: <slrn986r9a.i9r.dha@panix6.panix.com>

On Thu, 08 Feb 2001 23:51:52 GMT, Tad McClellan <tadmc@augustmail.com> wrote:
>
>   You don't (or shouldn't anyway) get flamed here for being
>   new to Perl. You get flamed here for being new to Usenet.

As much as I respect Tad, I need to disagree slightly.

Being new to Usenet doesn't get you flamed.  Not bothering to find out
how one is expected to act on Usenet (and taking that to heart) gets
you flamed.

dha

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
Uh, yeah.  Well, that's my mistake for the year...
	- Larry Wall


------------------------------

Date: Fri, 09 Feb 2001 03:54:23 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Using regex to match numbers (not digits)?
Message-Id: <slrn986i22.cpv.tadmc@tadmc26.august.net>

JMT <ccx138@coventry.ac.uk> wrote:
>Tad McClellan wrote:

>> If all of those fail, _then_ you resort to search engines and books.

>I go for books first because you can take them on the bus or to the
>toilet with you. ;)


It is much handier than a CRT if you should errr, um... run
short on supplies. Nobody reads those preface pages anyway...


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

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 V10 Issue 252
**************************************


home help back first fref pref prev next nref lref last post