[15599] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3012 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 11 00:10:29 2000

Date: Wed, 10 May 2000 21:10:12 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <958018212-v9-i3012@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 10 May 2000     Volume: 9 Number: 3012

Today's topics:
    Re: Printing Arrays <nospam@devnull.com>
    Re: regex question <nospam@devnull.com>
    Re: regex question <uri@sysarch.com>
    Re: removing carriage returns from a form entry <nospam@devnull.com>
    Re: removing carriage returns from a form entry <uri@sysarch.com>
    Re: removing carriage returns from a form entry <phill@modulus.com.au>
        shooting yourself in the foot ... <j.beard@citr.com.au>
    Re: shooting yourself in the foot ... <tina@streetmail.com>
    Re: shooting yourself in the foot ... <nospam@devnull.com>
    Re: shooting yourself in the foot ... <jeff@vpservices.com>
    Re: Still having problems with cgi under IIS <tfm@sei.cmu.edu>
    Re: Where's the FAQ? <news@theedgeofpanic.freeserve.co.uk>
    Re: Where's the FAQ? <phill@modulus.com.au>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 11 May 2000 01:21:33 GMT
From: The WebDragon <nospam@devnull.com>
Subject: Re: Printing Arrays
Message-Id: <8fd1ut$b3$1@216.155.32.159>

In article <x73dnqt1uh.fsf@home.sysarch.com>, Uri Guttman 
<uri@sysarch.com> wrote:

 | defending anything by saying tcl does it is a lost cause. how about
 | making EACH of their functions into its onw man page installed with the
 | rest of the manuals. man of any common name gets me the useless tcl
 | command man page. brilliant organization in that group.
 | 
 |   TW> *flee*
 | 
 | you can't flee if you keep coming back for more questions.

heh good point. ;]

 | yes, studly caps works in perl as it would in any normal language with
 | cased identifiers. but it still sicks in any language. separating words
 | is why ${DEITY} gave us the underscore char. and in the perl culture
 | (the only true one), underscore is used and studly caps are rightfully
 | reviled.

yack. *sigh* so just because my brain handles it fine this way isn't a 
good enough reason to let it work for me? 

This is a rather silly thing to quibble about, IMNERHO[1].

A lot of people hate the Macintosh too (usually for spurious reasons, 
but some of them have valid gripes, admittedly), but I'm not letting 
THAT stop me from USING ONE EITHER. 

<grin> 

I wouldn't switch to using Windows EVEN IF that was the only way that 
you'd help me with my scripting, and I see no reason to switch a naming 
convention that is 

    syntactically correct,
    works for me,
    is easily visually parsed by me,
    doesn't break anything,
    provides MORE THAN ADEQUATE clues as to what the variables contain,

EVEN IF that was the only way you'd help me. 

'nuff said.. 

can we get back to the scripting problems and Q&A instead of quibbling 
over something as stupid as whether I use $map_dir or $mapDir ? 

<huge emphasis>honestly.</huge emphasis>


[1] 'In My Never Even Remotely Humble Opinion" - Stanford McCandlish

-- 
send mail to mactech (at) webdragon (dot) net instead of the above address. 
this is to prevent spamming. e-mail reply-to's have been altered 
to prevent scan software from extracting my address for the purpose 
of spamming me, which I hate with a passion bordering on obsession.  


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

Date: 11 May 2000 02:24:20 GMT
From: The WebDragon <nospam@devnull.com>
Subject: Re: regex question
Message-Id: <8fd5kk$bb8$0@216.155.32.24>

In article <slrn8hjc6o.so9.abigail@ucan.foad.org>, abigail@arena-i.com 
wrote:

 | On Fri, 05 May 2000 20:27:25 GMT, gbaker@cs.umb.edu <gbaker@cs.umb.edu> 
 | wrote:
 | ++ 
 | ++ 
 | ++ Hi,
 | ++ 
 | ++ I have a messy data set of street names with stuff like :
 | ++ 
 | ++    10 MAINST
 | ++    15 LOCUST
 | ++     7 1ST
 | ++    55 PARK WEST
 | ++    12 BALLASTST
 | ++    15 EAST
 | ++    22 NORWALLST
 | ++ 
 | ++ What I would like to do is replace /st$/ with " st"
 | ++ if the two letters before it are not some of the common
 | ++ ones that come up ( i.e. CU in Locust, WE in West, EA in East, ).
 | 
 | 
 | #!/opt/perl/bin/perl -w
 |  
 | use strict;
 |  
 | my @common = map {/(..)st$/i} qw /Locust West East/;
 |  
 |  
 | foreach (<DATA>) {
 |     local $" = "|";
 |     s/(?<!@common)(?=st$)/ /i;
 |     print;
 | }
 |  
 | __DATA__
 |    10 MAINST
 |    15 LOCUST
 |     7 1ST
 |    55 PARK WEST
 |    12 BALLASTST
 |    15 EAST
 |    22 NORWALLST

this script gives me 

# Sequence (?<...) not recognized, <DATA> chunk 7.

is this a perl version problem? only have 5.004 here. :/

-- 
send mail to mactech (at) webdragon (dot) net instead of the above address. 
this is to prevent spamming. e-mail reply-to's have been altered 
to prevent scan software from extracting my address for the purpose 
of spamming me, which I hate with a passion bordering on obsession.  


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

Date: Thu, 11 May 2000 03:13:01 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: regex question
Message-Id: <x7u2g5srsz.fsf@home.sysarch.com>

>>>>> "TW" == The WebDragon <nospam@devnull.com> writes:

  TW>  |     s/(?<!@common)(?=st$)/ /i;

  TW> # Sequence (?<...) not recognized, <DATA> chunk 7.

  TW> is this a perl version problem? only have 5.004 here. :/

lookbehind was added in 5.005. just tell the macperl folks to get 5.6
done already. :)

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: 11 May 2000 03:41:54 GMT
From: The WebDragon <nospam@devnull.com>
Subject: Re: removing carriage returns from a form entry
Message-Id: <8fda62$jce$2@216.155.32.24>

In article <3919E350.6B57CFC1@auckland.ac.nz>, Matthew Stevenson 
<mj.stevenson@auckland.ac.nz> wrote:

 | foreach $field (@db_user_definable_field_order)
 |    {
 |     # remove newlines and carrage returns
 |     $form_data{$field} =~ tr/\015\012//d; 
 |    }

Newbie alert! 

will this still work if they \015\012 are reversed in order? like 
\012\015 ? or are they only parsed in the order given? 

i.e. is it "any" or linear ? :) 

gah, I feel so stupid. :)

-- 
send mail to mactech (at) webdragon (dot) net instead of the above address. 
this is to prevent spamming. e-mail reply-to's have been altered 
to prevent scan software from extracting my address for the purpose 
of spamming me, which I hate with a passion bordering on obsession.  


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

Date: Thu, 11 May 2000 03:49:12 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: removing carriage returns from a form entry
Message-Id: <x7r9b9sq4p.fsf@home.sysarch.com>

>>>>> "TW" == The WebDragon <nospam@devnull.com> writes:

  TW> In article <3919E350.6B57CFC1@auckland.ac.nz>, Matthew Stevenson 
  TW> <mj.stevenson@auckland.ac.nz> wrote:

  TW>  |     $form_data{$field} =~ tr/\015\012//d; 

  TW> will this still work if they \015\012 are reversed in order? like 
  TW> \012\015 ? or are they only parsed in the order given? 

the arguments to tr are character sets and not strings. they are closest
to char classes in regexes. so the order of the chars doesn't matter.

tr maps chars it finds in the first set to the second set (and it has
several modifiers as well). so the two sets have to be in order relative
to each other but in no absolute order.

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, 11 May 2000 13:56:47 +1000
From: Peter Hill <phill@modulus.com.au>
Subject: Re: removing carriage returns from a form entry
Message-Id: <391A2F7F.39F9@modulus.com.au>

The WebDragon wrote:
> 
> In article <3919E350.6B57CFC1@auckland.ac.nz>, Matthew Stevenson
> <mj.stevenson@auckland.ac.nz> wrote:
> 
>  | foreach $field (@db_user_definable_field_order)
>  |    {
>  |     # remove newlines and carrage returns
>  |     $form_data{$field} =~ tr/\015\012//d;
>  |    }
> 
> Newbie alert!
> 
> will this still work if they \015\012 are reversed in order? like
> \012\015 ? or are they only parsed in the order given?
> 
> i.e. is it "any" or linear ? :)

All.

> 
> gah, I feel so stupid. :)
s/stupid/uninformed/.
see the docs for perlop, search for tr, take note of the /d modifier.

-- 
Peter Hill,
Modulus Pty. Ltd.,
http://www.modulus.com.au/


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

Date: Thu, 11 May 2000 12:51:53 +1000
From: James Beard <j.beard@citr.com.au>
Subject: shooting yourself in the foot ...
Message-Id: <391A2049.39E05465@citr.com.au>


Hi all,

I was just trolling through some old jokes, and I came across
http://www.users.csbsju.edu/~lziegler/ShootingInFoot.html

Does anyone have a "shooting yourself in the foot with perl"?

Later
James


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

Date: Wed, 10 May 2000 23:25:15 -0400
From: Tina Mueller <tina@streetmail.com>
Subject: Re: shooting yourself in the foot ...
Message-Id: <8fd96e$ah2k3$1@fu-berlin.de>

hi,

James Beard wrote:

> I was just trolling through some old jokes, and I came across
> http://www.users.csbsju.edu/~lziegler/ShootingInFoot.html

I know another version of this great text at
http://userpage.fu-berlin.de/~jansro/ht/foot.html

> Does anyone have a "shooting yourself in the foot with perl"?

not yet, but what about this one:
Download the CPAN module Body::Foot and try

#!/usr/bin/perl -w
use Body::Foot qw(shoot);
shoot or die;


bye,
tina

--
       --- ICQ #73179850 ---        |     _   enter the
http://user.berlin.de/~tina.mueller |  __| |___  ___ _ _ ___
----    tina's moviedatabase    ----| / _` / _ \/ _ \ '_(_-< of
--search & add comments or reviews--| \__,_\___/\___/_| /__/ perception





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

Date: 11 May 2000 03:47:50 GMT
From: The WebDragon <nospam@devnull.com>
Subject: Re: shooting yourself in the foot ...
Message-Id: <8fdah6$jce$3@216.155.32.24>

In article <391A2049.39E05465@citr.com.au>, James Beard 
<jmbeard@ozemail.com.au> wrote:

 | Hi all,
 | 
 | I was just trolling through some old jokes, and I came across
 | http://www.users.csbsju.edu/~lziegler/ShootingInFoot.html
 | 
 | Does anyone have a "shooting yourself in the foot with perl"?
 | 
 | Later
 | James

I have something similar that's missing examples for 

RPG:       
CGI:
perl:        
Tcl/Tk:       
Python:       
ActiveX:       
AppleScript:       
Visual Basic:       

I got a REAL SERIOUS kick out of the Unix example on that page though 

* Falling off the floor laughing :D

any help filling in the blanks would be appreciated though :)

-- 
send mail to mactech (at) webdragon (dot) net instead of the above address. 
this is to prevent spamming. e-mail reply-to's have been altered 
to prevent scan software from extracting my address for the purpose 
of spamming me, which I hate with a passion bordering on obsession.  


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

Date: Wed, 10 May 2000 21:02:19 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: shooting yourself in the foot ...
Message-Id: <391A30CB.FEDFEFC0@vpservices.com>

James Beard wrote:
> 
> Hi all,
> 
> I was just trolling through some old jokes, and I came across
> http://www.users.csbsju.edu/~lziegler/ShootingInFoot.html
> 
> Does anyone have a "shooting yourself in the foot with perl"?

Given Perl's love of symbols and brevity, and the sound of the way this
is pronounced, this is not even a one liner, it's a one character:

	!

-- 
Jeff


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

Date: Wed, 10 May 2000 22:13:49 -0400
From: Ted Marz <tfm@sei.cmu.edu>
Subject: Re: Still having problems with cgi under IIS
Message-Id: <391A175D.D02D5C@sei.cmu.edu>

Just for grins, try naming the file as
<whatever>.plx     rather than <whatever>.pl

The shebang (#!) under windows doesn't matter (except for portability),
as windows uses a file type association, rather than parsing the file.

Ted


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

Date: Thu, 11 May 2000 02:56:31 +0100
From: "Bagsy" <news@theedgeofpanic.freeserve.co.uk>
Subject: Re: Where's the FAQ?
Message-Id: <8fd446$8s2$1@newsg2.svr.pol.co.uk>


Tom Phoenix <rootbeer@redcat.com> wrote in message
news:Pine.GSO.4.10.10005101720510.16364-100000@user2.teleport.com...
> On Wed, 10 May 2000, Bagsy wrote:
>
> >     Just got here and was looking for the FAQ but I don't see it
anywhere in
> > the last 400 headers. Can somebody post me a URL for the FAQ please?
>
> My frequent posting of "How to find the Perl FAQ" shows up every week.
> Would it do any more good if it appeared more often than that?
>
    What day do you post it? It wasn't included in the last 400 headers from
what I can see. This group seems to move pretty fast so perhaps it would be
a good idea to post it more often, assuming your post was meant in the good
nature I assumed.




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

Date: Thu, 11 May 2000 12:28:03 +1000
From: Peter Hill <phill@modulus.com.au>
Subject: Re: Where's the FAQ?
Message-Id: <391A1AB3.8E5@modulus.com.au>

Bagsy wrote:
> 
> Tom Phoenix <rootbeer@redcat.com> wrote in message
> news:Pine.GSO.4.10.10005101720510.16364-100000@user2.teleport.com...
> > On Wed, 10 May 2000, Bagsy wrote:
> >
> > >     Just got here and was looking for the FAQ but I don't see it
> anywhere in
> > > the last 400 headers. Can somebody post me a URL for the FAQ please?
> >
> > My frequent posting of "How to find the Perl FAQ" shows up every week.
> > Would it do any more good if it appeared more often than that?
> >
>     What day do you post it? It wasn't included in the last 400 headers from
> what I can see. This group seems to move pretty fast so perhaps it would be
This group moves at around 200+ postings/day.

> a good idea to post it more often, assuming your post was meant in the good
Good assumption.

> nature I assumed.
Another good assumption.

Tom is part of a small group of real experts who give invaluable
guidance for plodders like me, including the often invaluable guidance
to read the FAQ, which is extensive and accurate for any computing
language. 
Pleased to see you were looking for it, it's a rivetting read.
-- 
Peter Hill,
Modulus Pty. Ltd.,
http://www.modulus.com.au/


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

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 3012
**************************************


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