[14015] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1425 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Nov 19 12:06:16 1999

Date: Fri, 19 Nov 1999 09:05:27 -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: <943031127-v9-i1425@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 19 Nov 1999     Volume: 9 Number: 1425

Today's topics:
    Re: "The Art of Perl" (was Re: Perl programming sytle) (brian d foy)
    Re: "The Art of Perl" (was Re: Perl programming sytle) <jeffp@crusoe.net>
    Re: /o in regexp with mod_perl lee.lindley@bigfoot.com
    Re: /o in regexp with mod_perl <moseley@best.com>
    Re: 5.005_03 v/s 5.004_03 <rootbeer@redcat.com>
    Re: ActivePerl install problem fix (Kragen Sitaker)
    Re: adjusting HTML <cassell@mail.cor.epa.gov>
    Re: another Reg. Exp. problem (Tad McClellan)
    Re: Call for Programs: the "phonecode" benchmark <cassell@mail.cor.epa.gov>
    Re: Call for Programs: the "phonecode" benchmark <uri@sysarch.com>
    Re: Can open file with Telnet but not browser <cassell@mail.cor.epa.gov>
        Database Locking (Help!) Schulz@gmx.net
    Re: Database Locking (Help!) <moseley@best.com>
    Re: Database Locking (Help!) <rootbeer@redcat.com>
        database <cure@texas.net>
    Re: database (Martien Verbruggen)
    Re: database <cure@texas.net>
    Re: developer required for advanced Perl work (Tad McClellan)
    Re: Fetch Dilbert. (Martien Verbruggen)
    Re: Fetch Dilbert. <cassell@mail.cor.epa.gov>
    Re: Fetch Dilbert. <uri@sysarch.com>
    Re: file descriptors already used when perl starts <rootbeer@redcat.com>
    Re: File::Find on Win32 :-( - getit4.pl (0/1) (John Armsby)
    Re: File::Find on Win32 :-( - getit4.pl (1/1) (John Armsby)
    Re: File::Find on Win32 :-( - getit4.pl (1/1) (John Armsby)
    Re: Find the work you love <cassell@mail.cor.epa.gov>
        generating error messages from string <sds@goems.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 18 Nov 1999 21:06:57 -0500
From: brian@smithrenaud.com (brian d foy)
Subject: Re: "The Art of Perl" (was Re: Perl programming sytle)
Message-Id: <brian-ya02408000R1811992106570001@news.panix.com>

In article <Pine.GSO.4.10.9911181209270.24181-100000@crusoe.crusoe.net>, japhy@pobox.com posted:

> Well, PINCACINP.  (Perl is not C, and C is not Perl.)

i thought that was "Perl is not CGI, and CGI is not Perl."  i wish
i had used that for my COMDEX talk ;)

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>


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

Date: Thu, 18 Nov 1999 21:26:04 -0500
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: "The Art of Perl" (was Re: Perl programming sytle)
Message-Id: <Pine.GSO.4.10.9911182123510.26722-100000@crusoe.crusoe.net>

On Nov 18, brian d foy blah blah blah:

> In article <Pine.GSO.4.10.9911181209270.24181-100000@crusoe.crusoe.net>, japhy@pobox.com posted:
> 
> > Well, PINCACINP.  (Perl is not C, and C is not Perl.)
> 
> i thought that was "Perl is not CGI, and CGI is not Perl."  i wish
> i had used that for my COMDEX talk ;)

Well, it's basically PIN_A_INP.  Choose your letter(s).

  $value{C} = [ qw( C CGI ) ];

There.

-- 

  MIDN 4/C PINYAN, USNR, NROTCURPI     http://www.pobox.com/~japhy/
  jeff pinyan: japhy@pobox.com     perl stuff: japhy+perl@pobox.com
  "The Art of Perl"               http://www.pobox.com/~japhy/book/      
  CPAN ID: PINYAN  http://www.perl.com/CPAN/authors/id/P/PI/PINYAN/
  PerlMonth - An Online Perl Magazine     http://www.perlmonth.com/



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

Date: 18 Nov 1999 23:03:19 GMT
From: lee.lindley@bigfoot.com
Subject: Re: /o in regexp with mod_perl
Message-Id: <8120jn$ncm$1@rguxd.viasystems.com>

Bill Moseley <moseley@best.com> wrote:

:>Of course, match_it() doesn't know that $match_re was generated from 
:>qr// or if it is just a quoted string.  That's where I was confused.

perl knows.  I covered this same ground less than a month ago
and I am gratified that you have stumbled over the same misconceptions
that I did.  :-)

ksh: perl -de '$re=qr{this}; $_="Is it this?"; print "true\n" if $re'

Loading DB routines from perl5db.pl version 1.0402
[snip]
  DB<1> print ref $re
Regexp			# <<<<< Object of type Regexp
  DB<2> x $re
0  (?-xism:this)	# <<<<< Blessed scalar object
   -> undef
  DB<3> x $_
0  'Is it this?'	# <<<<< Simple scalar containing string
  DB<4> q

-- 
// Lee.Lindley   /// I used to think that being right was everything.
// @bigfoot.com  ///  Then I matured into the realization that getting
////////////////////   along was more important.  Except on usenet.


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

Date: Thu, 18 Nov 1999 15:30:43 -0800
From: Bill Moseley <moseley@best.com>
Subject: Re: /o in regexp with mod_perl
Message-Id: <MPG.129e2bf91912fa4a989890@nntp1.ba.best.com>

Kragen Sitaker (kragen@dnaco.net) seems to say...
> In article <MPG.129dff97fb5a246c98988e@nntp1.ba.best.com>,
> Bill Moseley  <moseley@best.com> wrote:
> >Of course, match_it() doesn't know that $match_re was generated from 
> >qr// or if it is just a quoted string.
> 
> No, but m// does.

But my point was that if you were writing match_it() and didn't know 
what was going to be passed (a qr// string or a q// string) you would 
normally want to use /o inside the loop.

But...


From perlop

 # poor man's grep
 $arg = shift;
 while (<>) {
     print if /$arg/o;       # compile only once
 }

Now, use re 'debug' shows the same thing with or without /o.  So is use 
re 'debug' not telling the full story or is the perlop example not 
correct and /o isn't needed?


-- 
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.


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

Date: Thu, 18 Nov 1999 18:03:33 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: 5.005_03 v/s 5.004_03
Message-Id: <Pine.GSO.4.10.9911181801400.16575-100000@user2.teleport.com>

On Thu, 18 Nov 1999, ylegrice wrote:

> String found where operator expected at (eval 2056) line 1, near "% =
> ''"
>         (Missing operator before  ''?)
> 
> Actually, I get one of these messages for each file passed to the
> script.  However, when I try to find a line inside my script that
> matches the "% = ....", I can't find it.

That's because it's not in your script. It's in the 2056th eval STRING
which is compiled during the course of your script. What's on line 1 of
that eval string?

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Thu, 18 Nov 1999 19:56:19 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: ActivePerl install problem fix
Message-Id: <DRYY3.25919$YI2.1153255@typ11.nn.bcandid.com>

In article <38342E92.947A30F@tivoli.com>,
Jack Robertson  <jarobert@tivoli.com> wrote:
>Several postings have mentioned ActivePerl install problems
>that yield a "Could not create Perl interpreter" message.
>
>A fix that did work: Remove all of the existing 'perl.exe'
>from the environment path before installing.

So you were running an old perl.exe with a new libperl.dll?  Or could it
be the old DLL that was screwing you up?
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08.  Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Thu, 18 Nov 1999 15:49:26 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: adjusting HTML
Message-Id: <38349086.96D4CB78@mail.cor.epa.gov>

Jeff Sack wrote:
[snippety]
> I guess what I want is something that will reliably give me exactly what's
> inside the <H1> tags for example.  I want to be able to modify that and have
> it placed back in the scalar $html.  Is there something that will give me a
> reference to a substring so that I can modify the substring and the larger
> string will also be affected?  I hope this question makes sense.

Jonathan's point was [I believe] that you cannot do this
*reliably* [to use your word] in the general case with a regex.
Because there are too many ways to insert thingies inside the
tags which will break a regular expression.  To get it right
in the general case, you need something which can do the tokenizing
which HTML::Parser does.  BTW, it is not really a parser of HTML,
so the name is somewhat misleading.

If you have total control over the HTML pages, then you can be
assured of the possible weirdness that might be between tags.
In this case, a regex can do what you want.. but you may have
to specify all your nasty cases as part of the regex.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Thu, 18 Nov 1999 22:55:15 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: another Reg. Exp. problem
Message-Id: <slrn839ih3.12l.tadmc@magna.metronet.com>

On Mon, 15 Nov 1999 11:52:16 -0800, Larry Rosler <lr@hpl.hp.com> wrote:

>The '/s' modifier affects *only* the 
                           ^^^^^^

   Unless you have set $*, that is.

   But setting $* is deprecated, so nobody uses it anymore.

   And it's not germane to the original problem anyway (but when
   I saw the high emphasis, I thought I should point it out).


>interpretation of the '.' metacharacter in a regex, and there aren't any 
>of those in there, are there?


----------------
#!/usr/bin/perl -w
use strict;

$* = 1;

$_ = "foo\nbar\nbaz";

if ( /^ba/ )
   { print "matched without //s\n" }

if ( /^ba/s )
   { print "matched with //s\n" }
----------------


-- 
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Thu, 18 Nov 1999 15:53:42 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Call for Programs: the "phonecode" benchmark
Message-Id: <38349186.D625757@mail.cor.epa.gov>

Anno Siegel wrote:
[snip]
> Speaking of coincidence, though... The problem that Lutz wants
> coded in various languages (note lack of qualifier to accommodate
> sensibilities) is exactly what Randal published in *mumble* about
> a month ago: Finding words from a dictionary that correspond to
> a given phone number.  He may want to comment himself.

Which brings to mind another issue.  If Lutz is asking strangers
to submit code to him, isn't he going to end up testing the
algorithm skills of sundry loose screws, rather than the 
langauges themselves?  Wouldn't he be better off by suggesting
one or more algorithms and encouraging people to code them
up in native form?

Just wondering,

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: 18 Nov 1999 19:16:11 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Call for Programs: the "phonecode" benchmark
Message-Id: <x7wvrfqqt0.fsf@home.sysarch.com>

>>>>> "DC" == David Cassell <cassell@mail.cor.epa.gov> writes:

  DC> Which brings to mind another issue.  If Lutz is asking strangers
  DC> to submit code to him, isn't he going to end up testing the
  DC> algorithm skills of sundry loose screws, rather than the 
  DC> langauges themselves?  Wouldn't he be better off by suggesting
  DC> one or more algorithms and encouraging people to code them
  DC> up in native form?

good point. he wants multiple submissions for each maguage so he can see
a variety of ways to do it. i am not sure this is a worthy project and
the posed problem is too annoying for me to spend time on it. someone on
FWP posted a mostly working solution. it was only 5 lines or so and
could be improved a great deal. the contest also asks for quality code
(formatting, comments, design notes, etc.). if someone here were to
start a thread on a solution, maybe we could do a group coding in perl
golf mode or something like that. kick some other languages butt's like
in the practice of programming (perl had the shortest code by far and
2nd fastest run time).

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: Thu, 18 Nov 1999 15:25:06 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Can open file with Telnet but not browser
Message-Id: <38348AD2.44719856@mail.cor.epa.gov>

amonotod wrote:
> David Cassell <cassell@mail.cor.epa.gov> wrote:
[snip of everything]
> > I don't want to write your code for you.  But I have confidence
> > that you can write model code here.  Please set a good example.
> > Be the Brian Wallace of this newsgroup, not the Latrell
> > Sprewell.  ;-)
> Those names are not familiar to me, but okay...

Basketball.  The first is not well known, but a solid citizen.
Sprewell is best known for choking his coach half to death
because the coach said ordinary coach-stuff to him in a 
practice.  Hence the next line:

> > David, already choking...

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Thu, 18 Nov 1999 23:08:54 GMT
From: Schulz@gmx.net
Subject: Database Locking (Help!)
Message-Id: <8120tt$hql$1@nnrp1.deja.com>

Hey

Sorry that I'm probably asking a question that has been asked already a
hundred times, but I spend two evenings not finding an answer and so I
hope you excuse it.
I need a database for a cgi application and of course there will be a
few people using it simultaneously. The problem is that I haven't found
a satisfying solution for the locking. The example shown under perldoc
DB_File isn't acceptable because of the 10 seconds delay and I can't use
the GDBM or NDBM because I need a platform independent solution. I'm
really confused because I read a lot of articles saying that many of the
locking examples in the documentations aren't safe. I would prefer
using such a DBM and not use DBI because it isn't sure if there will be
a database running on the webserver.
Please tell me how I do the database locking, so it will be fast, system
independent and safe. I'm really frustrated not finding a solution!

Thank you very much!!!

Roland


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Thu, 18 Nov 1999 15:47:57 -0800
From: Bill Moseley <moseley@best.com>
Subject: Re: Database Locking (Help!)
Message-Id: <MPG.129e300ae2f6a370989891@nntp1.ba.best.com>

Schulz@gmx.net (Schulz@gmx.net) seems to say...
> I need a database for a cgi application and of course there will be a
> few people using it simultaneously. The problem is that I haven't found
> a satisfying solution for the locking. The example shown under perldoc
> DB_File isn't acceptable because of the 10 seconds delay and I can't use
> the GDBM or NDBM because I need a platform independent solution. 

I've always just used a lockfile, wrapping the flock in an eval with a 
timeout so I don't wait forever.

Typically, my lock file is my error log file.

    eval {
        local $SIG{ALRM} = 
            CORE::sub { 
                die "Timed out Waiting for File Lock\n" 
            };

        alarm ( 10 );

        flock( LOG_FILE, LOCK_EX )  or die "failed to set lock '$!'";
        alarm 0;                 
    };


    if ($@) { die $@ };


-- 
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.


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

Date: Thu, 18 Nov 1999 18:23:30 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Database Locking (Help!)
Message-Id: <Pine.GSO.4.10.9911181820510.16575-100000@user2.teleport.com>

On Thu, 18 Nov 1999 Schulz@gmx.net wrote:

> The problem is that I haven't found a satisfying solution for the
> locking. The example shown under perldoc DB_File isn't acceptable
> because of the 10 seconds delay

I may be mistaken, since I read that source in something of a hurry, but
isn't the ten-second delay just to illustrate the point? That is, if you
wanted to see how this was working by having two or more processes
updating concurrently, you'd need a little delay to see what was
happening. Otherwise, it would be over in a fraction of a second.

Which isn't to say that the docs couldn't be a touch clearer about that.
When you have the patch ready, be sure to send it to the module's author.
:-)

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Thu, 18 Nov 1999 17:51:02 -0600
From: Cure <cure@texas.net>
Subject: database
Message-Id: <383490E6.799479D9@texas.net>

What is  the easiest way to delete a user from a database..

example i have a database that has a username,name,email,password

what is the easisest wya to write  a code that will delete a user from a
database

thxs:
cure@texas.net


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

Date: Fri, 19 Nov 1999 00:04:27 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: database
Message-Id: <fu0Z3.129$eR.3932@nsw.nnrp.telstra.net>

On Thu, 18 Nov 1999 17:51:02 -0600,
	Cure <cure@texas.net> wrote:
> What is  the easiest way to delete a user from a database..
> 
> example i have a database that has a username,name,email,password
> 
> what is the easisest wya to write  a code that will delete a user from a
> database

Euhmm.. database? Is this a relational database? A text file? a dbm
file? 

It matters, because the code will end up being very different for the
three above.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | If at first you don't succeed, try
Commercial Dynamics Pty. Ltd.   | again. Then quit; there's no use
NSW, Australia                  | being a damn fool about it.


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

Date: Thu, 18 Nov 1999 18:27:36 -0600
From: Cure <cure@texas.net>
Subject: Re: database
Message-Id: <38349978.31A067FE@texas.net>

go here
http://www.cureable.com/crypt/register2.cgi
and click on remove user,    
my code works but its long and sucks

justy wanted to know whats the easiest code to delete a user froma 
database   

Martien Verbruggen wrote:
> 
> On Thu, 18 Nov 1999 17:51:02 -0600,
>         Cure <cure@texas.net> wrote:
> > What is  the easiest way to delete a user from a database..
> >
> > example i have a database that has a username,name,email,password
> >
> > what is the easisest wya to write  a code that will delete a user from a
> > database
> 
> Euhmm.. database? Is this a relational database? A text file? a dbm
> file?
> 
> It matters, because the code will end up being very different for the
> three above.
> 
> Martien
> --
> Martien Verbruggen              |
> Interactive Media Division      | If at first you don't succeed, try
> Commercial Dynamics Pty. Ltd.   | again. Then quit; there's no use
> NSW, Australia                  | being a damn fool about it.


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

Date: Thu, 18 Nov 1999 23:14:46 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: developer required for advanced Perl work
Message-Id: <slrn839jlm.12l.tadmc@magna.metronet.com>

On Tue, 16 Nov 1999 06:11:54 GMT, Bretto <news@moggy.com> wrote:

>Thanks for your direction.
>
>Rude, ignorant, but to the point.
       ^^^^^^^^

   And what was it that Uri doesn't know that you are 
   referring to there?

   I saw that _you_ didn't know some things, but I didn't see
   that in what Uri wrote.


   What _are_ you talking about there?

   Or did you just use that word because it is insulting-sounding?


-- 
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Thu, 18 Nov 1999 23:07:43 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Fetch Dilbert.
Message-Id: <3F%Y3.102$eR.3265@nsw.nnrp.telstra.net>

[This is getting a bit too offtopic, but I still want to add something
:)]

On 18 Nov 1999 16:55:31 -0500,
	Uri Guttman <uri@sysarch.com> wrote:
> >>>>> "P'tmaN" == Philip 'Yes, that's my address' Newton <nospam.newton@gmx.li> writes:
> 
>   P'tmaN> Well, yes -- but putting Perl into /opt (by default, or for other
>   P'tmaN> reasons) reminded me of HP-UX. Linux puts it into /usr/local by
>   P'tmaN> default, IIRC.
> 
> i use solaris and i always install open source into /usr/local. most are
> defaulted to that dir which makes life much easier. in fact i find it
> annoying that linux/bsd* ship with perl in /usr/bin and it maybe an old
> or even broken (red hat) version. so you have to have /usr/local/bin in

Red Hat linux, out of the box, is very broken in this respect. But
after a bit of work it can be made to behave a lot better. Step one,
remove the perl that comes with it, compile your own perl and install. 
:)

> front of /usr/bin in PATH and MANPATH, etc. more pains in the butt. i
> think they should only put the core unix programs and libs in /usr and

No argument from me here. /usr should indeed be for core OS stuff and
utilities. RedHat is a bit too generous with what they consider to
belong there. But if that was the only broken decision they made that
could easily be fixed.

Although I do not mind symlinks from /usr/bin to more convenient
places. But that's mainly for things that can appear in a shebang
line.

> the third party (how do you define 3rd party in that world? :-) programs
> should go into /usr/local.

Well, yes. That is what /usr/local is intended for :) Of course, in
the case of most distributions of linux, many of the core OS utilities
are third party (GNU), and they don't actually belong in /usr/local.

I tend to put anything which is a (non-core) utility in
/usr/local/bin,lib,etc, and anything which could be considered a large
package, (and the distinction is admittedly very vague) in /opt. Perl
even helps you suring installation when you use the PREFIX by slightly
rearranging its path.

Having separate versions of Perl this way becomes a little more easily
manageable (/opt/perl/5.005, /opt/perl/5.004/ etc.). I provide
symlinks from  /usr/bin and /usr/local/bin into /opt/perl/'what I
consider to be the most reasonable version of perl'/bin.

A simple change to someone's path can change the perl version. A
simple rm -rf can remove a complete obsolete installation from your
system.

But, as I said before, all this is a highly disputed and discussed
hierarchy. It's basically meant to do what /usr/local was meant to do
as well long ago, and people keep saying that.

There's no real difference.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Think of the average person. Half of
Commercial Dynamics Pty. Ltd.   | the people out there are dumber.
NSW, Australia                  | 


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

Date: Thu, 18 Nov 1999 15:59:08 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Fetch Dilbert.
Message-Id: <383492CC.5A800ECD@mail.cor.epa.gov>

Kenneth Bandes wrote:
> 
> perldoc@my-deja.com wrote:
> > OK, I'll take the troll.
> >
> > Newbies beware - curmudgeonly old Unix cranky-pants like
> > Abigail won't even begin to consider ...
> [further abuse, invective, and fatuous bravado]
> > Awww, eat my shorts.
> 
> hmmm ... another case of Code Rage ...

Have you noticed that this newsgroup has become a home for
certain trolls, who seem to live for acidic exchanges with
Abigail and Uri [to name but two, and unfortunately I cannot 
exclude myself from the list]?  And have you noticed that 
when they no longer get vindictive responses, they give up
and go home?  Sometimes I worry that we are selectively
breeding a particular species of troll through our occasional
overuse of 'insecticides'...

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: 18 Nov 1999 19:12:07 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Fetch Dilbert.
Message-Id: <x7zowbqqzs.fsf@home.sysarch.com>

>>>>> "DC" == David Cassell <cassell@mail.cor.epa.gov> writes:

  DC> Have you noticed that this newsgroup has become a home for
  DC> certain trolls, who seem to live for acidic exchanges with
  DC> Abigail and Uri [to name but two, and unfortunately I cannot 
  DC> exclude myself from the list]?  And have you noticed that 
  DC> when they no longer get vindictive responses, they give up
  DC> and go home?  Sometimes I worry that we are selectively
  DC> breeding a particular species of troll through our occasional
  DC> overuse of 'insecticides'...

well perlquack seems to have run off home with his head up his ass. so i
think the good guys won this round. if he really was that last twit who
claimed to be able to come back anonymously, then i am doubly glad for
our exposing him. like all trolls he justs wants the attention and
doesn't care about content. xref jocylen (sp?) and reese and bottommind,
our top 3 of the last couple of years.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: Thu, 18 Nov 1999 15:06:48 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: file descriptors already used when perl starts
Message-Id: <Pine.GSO.4.10.9911181455210.16575-100000@user2.teleport.com>

On Thu, 18 Nov 1999 g0177325@my-deja.com wrote:

>   perl -e 'open A, ">&2"; open B, ">&2"; print fileno A, fileno B'
>   37
> 
> So, file descriptors 4,5,6 are somehow in use.  Why?

    $ perl -lwe 'open A, ">&2"; open B, ">&2"; print fileno A, fileno B'
    34

Mystery to me. But maybe one of those is the tempfile which holds the
source from -e.

Also, maybe you should see whether the same filehandles are seemingly "in
use" if you use a C program of your own making, rather than perl.

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Thu, 18 Nov 1999 23:53:37 GMT
From: jaws@mindspring.com (John Armsby)
Subject: Re: File::Find on Win32 :-( - getit4.pl (0/1)
Message-Id: <38349137.1751634@news.mindspring.com>

Here is my script.  I thought the attachment would make it...


#!c:\perl\bin\perl
use File::Find;

find sub{Getit();} , 'j:/depts/wspproje/projectd/library/';

sub Getit
{

$FileName =$File::Find::name;
@FileStat=stat($FileName);
$FileTime = $FileStat[9];
$LocalFileTime =localtime($FileTime);
$FileName =~ s/j://;
$FileName =~ s/\/depts/vault/;
print("\n$FileName|$LocalFileTime");
}


On 17 Nov 1999 12:58:34 GMT, Jonathan Stowe <gellyfish@gellyfish.com>
wrote:

>John Armsby <jaws@mindspring.com> wrote:
>> I have written a short Perl script to recurse through a Novel
>> (windows) directory and return path and file name.  Interestingly
>> enough "dir /b/s" does the same thing.  The good news is that it
>> works.  The bad news is that long filenames are reduced to the 8.3
>> format.  SURELY there is a way around this.  I am running the latest
>> from active state on NT with all the service packs installed.
>> 
>
>Sorry what was your perl question ?
>
>/j\
>-- 
>"The teenage masturbators of today are the television executives of
>tomorrow" - Melissa Cabriolet, Drop the Dead Donkey



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

Date: Thu, 18 Nov 1999 23:59:59 GMT
From: jaws@mindspring.com (John Armsby)
Subject: Re: File::Find on Win32 :-( - getit4.pl (1/1)
Message-Id: <3834924a.2026838@news.mindspring.com>

EXCUSE ME.  I did read the man page.  I would like to thank the author
for the wonderfully written, clearly stated information.  I would also
like to thank you for taking the time to answer my post.


On 17 Nov 1999 21:37:14 -0000, Jonathan Stowe
<gellyfish@gellyfish.com> wrote:

>On Wed, 17 Nov 1999 00:15:50 GMT John Armsby wrote:
>> begin 644 getit4.pl
>> M(R%C.EQP97)L7&)I;EQP97)L#0IU<V4@1FEL93HZ1FEN9#L-"@T*9FEN9"!S
>
>Well aside from the fact that it is considered to be in very poor taste
>to post uuencode stuff to non-binary groups I'm not quite sure what your
>problem is  - apart from a little rudimentary checking to see if you
>are getting what you think you are - read the File::Find manpage to
>find what is found in $_ in the wanted sub :
>
>
>#!c:\perl\bin\perl -w
>
>use File::Find;
>
>find \&Getit , 'develop/';
>
>
>sub Getit
>{
>if ( -f && (@FileStat = stat) )
>  {
>   $FileName =$File::Find::name;
>   $FileTime = $FileStat[9];
>   $LocalFileTime =localtime($FileTime);
>   $FileName =~ s/j://;
>   $FileName =~ s/\/depts/vault/;
>   print("\n$FileName|$LocalFileTime");
>  }
>}
>
>/J\
>-- 
>Jonathan Stowe <jns@gellyfish.com>
><http://www.gellyfish.com>
>Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>



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

Date: Fri, 19 Nov 1999 00:13:39 GMT
From: jaws@mindspring.com (John Armsby)
Subject: Re: File::Find on Win32 :-( - getit4.pl (1/1)
Message-Id: <383495e8.481627@news.mindspring.com>

I have run my script which you have kindly rewritten on windows 98.  I
will try it on my NT machine tomorrow.  It works flawlessly.

Thanks,

John

On Thu, 18 Nov 1999 23:59:59 GMT, jaws@mindspring.com (John Armsby)
wrote:

>EXCUSE ME.  I did read the man page.  I would like to thank the author
>for the wonderfully written, clearly stated information.  I would also
>like to thank you for taking the time to answer my post.
>
>
>On 17 Nov 1999 21:37:14 -0000, Jonathan Stowe
><gellyfish@gellyfish.com> wrote:
>
>>On Wed, 17 Nov 1999 00:15:50 GMT John Armsby wrote:
>>> begin 644 getit4.pl
>>> M(R%C.EQP97)L7&)I;EQP97)L#0IU<V4@1FEL93HZ1FEN9#L-"@T*9FEN9"!S
>>
>>Well aside from the fact that it is considered to be in very poor taste
>>to post uuencode stuff to non-binary groups I'm not quite sure what your
>>problem is  - apart from a little rudimentary checking to see if you
>>are getting what you think you are - read the File::Find manpage to
>>find what is found in $_ in the wanted sub :
>>
>>
>>#!c:\perl\bin\perl -w
>>
>>use File::Find;
>>
>>find \&Getit , 'develop/';
>>
>>
>>sub Getit
>>{
>>if ( -f && (@FileStat = stat) )
>>  {
>>   $FileName =$File::Find::name;
>>   $FileTime = $FileStat[9];
>>   $LocalFileTime =localtime($FileTime);
>>   $FileName =~ s/j://;
>>   $FileName =~ s/\/depts/vault/;
>>   print("\n$FileName|$LocalFileTime");
>>  }
>>}
>>
>>/J\
>>-- 
>>Jonathan Stowe <jns@gellyfish.com>
>><http://www.gellyfish.com>
>>Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
>



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

Date: Thu, 18 Nov 1999 16:08:33 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
To: Anna <annaatunderwoodgroup@my-deja.com>
Subject: Re: Find the work you love
Message-Id: <38349501.1BA7F128@mail.cor.epa.gov>

Anna wrote:
[snip]

I'm sorry, but you are posting a job opportunity in a newsgroup
where such posts are considered inappropriate.  This newsgroup
was created with a charter.  Please do not post messages like
this.  A more appropriate place is in a newsgroup which contains
the word 'job'.

Thank you,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: 18 Nov 1999 14:20:38 -0500
From: Sam Steingold <sds@goems.com>
Subject: generating error messages from string
Message-Id: <ubt8rd2t5.fsf@ksp.com>

suppose I want to print an error message that there is something wrong
in string $string at position $position.
if $string is "short", I can just print it, but if it's long, I have to
extract the relevant fragment &c, something along the lines of

sub parse_error {
  my ($pref,$str) = @_;
  my $pos = pos($_[1]);
  my $len = length($_[1]);
 
  if ($len + length($pref) < 75) { die $pref,"\"",$str,"\":",$pos,"\n"; }
  else {
    my $start = ($pos > 10 ? $pos-10 : 0);
    die $pref,":\n",substr($str,$start,40),"\n"," " x ($pos-$start),"^\n";
  }
}


does perl provide stock functionality for this?

-- 
Sam Steingold (http://www.podval.org/~sds/)
Micros**t is not the answer.  Micros**t is a question, and the answer is Linux,
(http://www.linux.org) the choice of the GNU (http://www.gnu.org) generation.
In every non-trivial program there is at least one bug.


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

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 V9 Issue 1425
**************************************


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