[15925] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3338 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 13 03:07:17 2000

Date: Tue, 13 Jun 2000 00:05:15 -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: <960879913-v9-i3338@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 13 Jun 2000     Volume: 9 Number: 3338

Today's topics:
    Re: ANSI Perl: No Way !!! <htp@mac.com>
    Re: ANSI Perl: No Way !!! <godzilla@stomp.stomp.tokyo>
        cmperl? <edwinNOedSPAM@mindless.com.invalid>
    Re: DBD-ODBC connect gives runtime exception (William Herrera)
    Re: Encrypting / decrypting. (Iain Chalmers)
    Re: How can I do this? please help (Tad McClellan)
    Re: Larry Rosler interview on perl.com! (David H. Adler)
    Re: Larry Rosler interview on perl.com! (David H. Adler)
    Re: Length of an Array (Tad McClellan)
    Re: Length of an Array <godzilla@stomp.stomp.tokyo>
    Re: Length of an Array <uri@sysarch.com>
    Re: Mail via perl <you.will.always.find.him.in.the.kitchen@parties>
    Re: NEWBIE cgi question please help! <Trevor@win32c.com>
    Re: NEWBIE cgi question please help! (David H. Adler)
    Re: NEWBIE cgi question please help! <you.will.always.find.him.in.the.kitchen@parties>
        NT versus Unix <jmourneyNOjmSPAM@hotmail.com.invalid>
    Re: NT versus Unix (Tad McClellan)
        Perl + web history (was: Re: ANSI Perl: No Way !!!) (Neil Kandalgaonkar)
    Re: Place to run programs <fromnews@pagepool.co.uk>
    Re: PLEASE HELP: Perl for WWW (Martin Vorlaender)
        ppm will not work. I get this error message. <unknown@hfx.com>
        Simple RegEx <grichards@flashcom.net>
    Re: Simple RegEx (Tad McClellan)
    Re: Simple RegEx (Tad McClellan)
    Re: Simple RegEx <grichards@flashcom.net>
    Re: Simple RegEx <grichards@flashcom.net>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Tue, 13 Jun 2000 14:23:33 +0930
From: Henry <htp@mac.com>
Subject: Re: ANSI Perl: No Way !!!
Message-Id: <htp-6F2207.14233313062000@news.metropolis.net.au>

In article <3945944E.7DD4657A@stomp.stomp.tokyo>, "Godzilla!" 
<godzilla@stomp.stomp.tokyo> wrote:

> Within one to two decades, Active Server Programming
> will be the rule rather than the exception. My best
> understanding from news and reading, setting up an
> internet service provider with ASP is point and click
> now. No system's operator, in the true sense, is needed.
> Seems building an ISP is best left to children much
> like leaving programming a VCR is best left to children,
> when is comes to ASP language. This is power.

It's also complete crap.

There are _huge_ technical and support aspects of running an ISP that 
can derive no benefit whatsoever from active server programming.

Of course, if you're talking about a web-hosting company, that's a 
different story.  But they are _not_ ISPs.  They do not have network 
infrastructure to maintain, huge numbers of support calls to field, and 
customers walking through the front door.

I concur with your first sentence, however.  PHP and kin (ssjs, asp, 
mod_perl...) pose an undeniable threat to standard Perl in its CGI role.  
I'd even go so far as to say that CGI as we know it could be on the 
endangered species list inside of 5 years, and gone the way of the dodo 
with a decade.

It's just a paradigm shift, and one that Perl helped start.  The only 
thing that's threatened is the Common Gateway Interface itself.  And who 
really cares about that, anyway?


> Ya know, this group reflects the real problem with Perl.
> Here, this is a contest between sissified obsessive
> techno-geekster boys, one declaring his ego phallic 
> larger than the other's and, an ensuing battle of, 
> 
> "Is not" .. "Is too" .. "Is not" .. "Is too" ..
> 
> takes on Godzilla size proportions, just like which 
> goes on within Perl leadership.

And most of corporate America.


> Meanwhile, Bill Gates is cutting throats and laughing
> all the way to his multitude of banks. He is, above
> all other qualities, a dynamic indomitable leader.
>
> I admire Bill Gates. He is an American Hero.

He's a one-eyed rat with remarkable self-preservation skills.

Henry.


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

Date: Mon, 12 Jun 2000 23:10:54 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: ANSI Perl: No Way !!!
Message-Id: <3945D06E.F489ACB5@stomp.stomp.tokyo>

Henry wrote:
> 
> In article <3945944E.7DD4657A@stomp.stomp.tokyo>, "Godzilla!"
> <godzilla@stomp.stomp.tokyo> wrote:

(ASP point and snip in use)

> > when is comes to ASP language. This is power.
 
> It's also complete crap.

I rather think of ASP as mule manure.

 
> There are _huge_ technical and support aspects 
> of running an ISP that can derive no benefit 
> whatsoever from active server programming.

Yes. However you will have fun explaining this
to Mr. U. Ben Took who has a notion he can rent
a janitoral closet, buy a lot of tin cans and
string, then setup an ISP and make a goodly
three-million a year servicing Outhouse,
California, a city with a population of 1,382.

Shirley you have talked with a stereotypical
technical support person at an average ISP,
a pimple face teenager fresh off the hamburger
flipping line at Sir Reginald's. We have all
once been this teenager.

 
> Of course, if you're talking about a web-hosting
> company, that's a different story.  But they are
> _not_ ISPs.  

In time, competition and market trends will slim
down the gross number of web hosts. Eventually,
Bill Gates will buy all of them, with pocket change.

 
> I concur with your first sentence, however.  
> PHP and kin (ssjs, asp, mod_perl...) pose an 
> undeniable threat to standard Perl in its CGI role.
> I'd even go so far as to say that CGI as we know it
> could be on the endangered species list inside of
> 5 years, and gone the way of the dodo with a decade.

Quite possible. This is sad. When cgi goes to Fatal
Exception Error Heaven, so do all my programs along 
with two of my favorite friends, my androids, Robby
and Roberta.

Hmm.. they may live on though via my home machine.


> > I admire Bill Gates. He is an American Hero.
 
> He's a one-eyed rat with remarkable self-preservation skills.

Missing some of his tail lately as well. Seems some
G-Men have been chewing his tail lately.



Henry, I have a plan to save Perl and, you are
just the man for the job. Think with imagination
on these thoughts, a way to reduce Perl core, reduce
memory bloat and speed up Perl along with giving it
a great marketing logo.

"Perl, programs itself and teaches you how to program."

Turn pragmas into modules.

Consider, worthless -w warnings. Ain't good for nothing
but annoying the heck out of you and confusing newbies
till they scream along with wasting a lot space in core.

Envision -w with DOS like switches:

-w /l     (check lexical scoping)
-w /d     (check dynamic scoping)
-w /my    (check my usage of my)
-w /local (check my usage of local)
-w /anon  (check my anon references)

Get the idea? Each pragma type could be turned
into a specific module with expanded functions,
including excellent Plain English documentation
opposed to current gibberish. Functions could
be expanded into some real serious extensive
and fast checking. Documentation could afford
paragraph length explanations with internal
links to expanded information and examples.

I am not talking about just warnings, but rather
all pragma hints and whatever else could be jerked
out of core and made into a series of specialized
modules with greatly expanded functions.

Impossible? Not at all and exceptionally logical.
What use are warnings when you have finished
writing your script and it functions perfect?
No use at all but, still resides in core.

Henry, care to guesstimate how much core could
be reduced if all pragmas, a good chunk of error
checking and whatever else, are removed from core?

If Perl 5 is to be Plug N Play, why not make it
a kick butt system? Can you imagine the benefit,
both in programming and marketing, if documentation
for Perl is kicked over into specialized modules
which could be healthy in size and, not effect
core at all. 

What features! 

"Listen Mr. U Ben Took, Perl is the programming
 language for you. It offers an easy to follow 
 tutorial, has its own Install Wizard just like 
 Windows and yet, is better documented in Plain 
 English than any other language system. Let me
 show you some great self-checking features which
 are also great instructional aides featuring Plain 
 English and loads of examples..."

What about it Henry? Why don't you work on some
modules which would strip core to a bare minimum
and expand functionality for pragmas, syntax
checking, compile time...

While you are at it Henry, turn Perl into a pseudo
executable for install with point and click options. 

Think, "Corvette Mako Shark, five-hundred-fifty horsepower."


Godzilla!


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

Date: Mon, 12 Jun 2000 23:24:04 -0700
From: Edwinek <edwinNOedSPAM@mindless.com.invalid>
Subject: cmperl?
Message-Id: <1fd39a90.1377c072@usw-ex0104-028.remarq.com>

Hi,

From a friend I got the URL
http://www.petes-place.com/cmperl.html, which is about how
Microsoft supposedly hijacked ActiveState Perl and which should
include a new, MS-free distribution. But sadly, the site seems to
be down now and has been for at least a week. Does anyone know
anything about this? Pete, are you reading this? What happened to
your site?

Edwin

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



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

Date: Tue, 13 Jun 2000 06:01:53 GMT
From: posting.account@lynxview.com (William Herrera)
Subject: Re: DBD-ODBC connect gives runtime exception
Message-Id: <3945cdb8.110307883@news.rmi.net>

On Mon, 12 Jun 2000 08:32:52 -0400, Tom Bates <tfbiv@SPAMMENOTerols.com> wrote:

>>>Last week, the statement below worked perfectly well. This week, I get
>>>the not very informative "Error: Runtime exception", with no script
>>>changes. I am hosted on an NT 4.0 server. Anybody have any clues?
>>>
>>
>>In my recent ODBC experience, this may be due to an exception generated within
>>the (non-perl) ODBC driver code running on the Windows machine. This exact
>>error happens here on occasion while doing an update of local Berkely DB files
>
>could not determine the cause of the problem. This weekend I found
>that using a DSN-less connection avoids the problem.

You mean, as in connecting directly to the file rather than through its DSN
alias?

So, the trap may have been occuring somewhere in the Windows alias-name lookup
or other networking layers. Interesting. 

---
The above from: address is spamblocked. Use wherrera (at) lynxview (dot) com for the reply address.


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

Date: Tue, 13 Jun 2000 15:04:54 +1000
From: bigiain@mightymedia.com.au (Iain Chalmers)
Subject: Re: Encrypting / decrypting.
Message-Id: <bigiain-1306001504540001@bigman.mighty.com.au>

In article <x7r9a2bxmb.fsf@onceler.kcilink.com>, Vivek Khera
<khera@kciLink.com> wrote:

>>>>>> "DW" == David Wall <darkon@one.net> writes:
>
>DW> mattking@techie.com (Matt King) wrote in
>DW> <8hnsjq$fhm$1@news1.transmedia.de>: 
>
>>> Hi. I need a way to encrypt and decrypt a small string (between 8 and 16
>>> chars). I have looked on CPAN, but all I find are add-in modules. I need
>
>DW> perldoc -f crypt
>
>So, how would you recommend he DECRYPT what you just told him to
>encrypt using crypt()
>
>If you're gonna answer, at least answer correctly.

how 'bout:

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

my $cyphertext = crypt('AAAAZAFZ','AA');

print de_crypt($cyphertext);

sub de_crypt{
my $cypertext=shift;
my $salt=substr($cyphertext,0,2);
my($a,$b,$c,$d,$e,$f,$g,$h,$i);

## Note: trivially extendable to include lowercase
## or more than 8 chars, proof of concept only :-)

for $a ('A'..'Z'){
 for $b ('A'..'Z'){
  for $c ('A'..'Z'){
   for $d ('A'..'Z'){
    for $e ('A'..'Z'){
     for $f ('A'..'Z'){
      for $g ('A'..'Z'){
       for $h ('A'..'Z'){
         return "plaintext = $a$b$c$d$e$f$g$h" if 
                crypt($a.$b.$c.$d.$e.$f.$g.$h,$salt) eq $cyphertext;
        }
       }
      }
     }
    }
   }
  }
 }
}

(Note: this may take some time :-)

big


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

Date: Mon, 12 Jun 2000 23:13:46 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How can I do this? please help
Message-Id: <slrn8kb9na.1om.tadmc@magna.metronet.com>

On Tue, 13 Jun 2000 01:13:06 GMT, Edge <edge@gecko.org> wrote:

>I am trying to write a perl script that will read a file (entry1 <tab>
>entry2) and generate a list on screen that a user can pick from.  The
>script will # all the entries and then the user can pick the #(s) he
>wants to see and the script will display the files.  What I need help
>with is generating the on-screen "menu" - I can get the selection and
>display the file....any help greatly appreciated.  Code snippet to
>follow:
>
>open(INDEX,'/web-it/NOCR/nocr.index');


You should always, yes *always*, check the return value from open():

   open( INDEX, '/web-it/NOCR/nocr.index' ) || 
      die "could not open '/web-it/NOCR/nocr.index' $!";


>format STDOUT =


Nobody uses formats anymore (more or less).

You can get what you want with printf().


[ snip format ]

>$i="0";
    ^ ^

Why do you want $i to be a string?

Those quotes do nothing but confuse the reader of your code
(it might be you, two months from now) who is going to
wonder why it is a string.

   $i = 0;   # $i is a number, no confusion. Use whitespace around operators


You should also be declaring your variables, and enabling warnings.


But, since you are numbering in line number sequence, why not
just use the $. (see perlvar.pod) variable for the numbering?


>while (<INDEX>) {
>        chop;


Uh oh.

chomp() has been used for removing newlines for several years
now. When I see you doing it a 5 year old way, I wonder if you
got that from a 5 year old place?  That would be bad. A lot
can change in 5 years  :-)

Where did you learn of using chop() to remove newlines?


>        ($nocr,$who)=split(/\s+/);
                             ^^^

I thought you said they were separated by TABs, so why also
split on 4 other (carriage return, space, line feed, form feed)
characters too?


>of course, what I'm looking for is :
>
>=========================================
>|  NOCR			Created by	|
>=========================================
>  0) NOCR.06122000           edge
>  1) NOCR.06122000-1         edge
>  2) NOCR.06122000-2         jack




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

print '
=========================================
|  NOCR                 Created by      |
=========================================
';


while (<DATA>) {
        chomp;
        my($nocr,$who)=split(/\t/);
        printf( "%3d) %-20s   %-25s\n", $. - 1, $nocr, $who);
}

__DATA__
NOCR.06122000   edge
NOCR.06122000-1 edge
NOCR.06122000-2 jack
-------------------------------------------------


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


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

Date: 13 Jun 2000 06:18:27 GMT
From: dha@panix.com (David H. Adler)
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <slrn8kbkhj.9h2.dha@panix6.panix.com>

On Tue, 13 Jun 2000 11:12:38 +0930, Henry <htp@mac.com> wrote:
>In article <slrn8kantb.fvk.dha@panix6.panix.com>, dha@panix.com (David 
>H. Adler) wrote:
>
>>>> and by what objective standards have you determined that these
>>>> people of yours arent 'doing pretty well' ? 
>>>
>>> By the number and flavour of support questions that come my way.  
>>> Specifically, the frequency of painful questions such as "What's a 
>>> POD?", "Where do I type 'perldoc xxx'?" and "Where the $#@! is the 
>>> manual for this thing?"
>> 
>> I'm sorry, but I cannot in any way find the last two of those even
>> vaguely a problem with perl.  That's a problem with users being so
>> unfamiliar with their operating system and the tools thereof that they
>> will not be able to do very much in attempting to program under it.
>
>I've said it before (at least 3 times) and I'll say it again:
>
>NO approachable documentation ships with the standard distribution of 
>Perl.

Ok, that's your opinion.  I disagree.  I'm certainly not saying it
can't be better in this respect, but I think you're leaning way to far
in the other direction.  I'm also unconvinced that the perl
distribution is required to bend over backwards in this respect.
You're having trouble understanding the docs?  There are book that are
easily had.  I realize you've said that that is not a sufficient
answer, but I disagree.

>It _is_ a Perl problem.  Specifically, it's a problem that only those 
>members of the Perl community who control the content of the standard 
>distribution can address.

Please note that I was specifically responding to the comment I
quoted, which included quotes that are quite equivalent to "I don't
know what a command line is" and "I don't know the basic information
system of the platform on which I work".  *Those* are not things that
are changed by rewriting the documentation.

>Bart Lateur earlier pointed out a URL to a tutorial in this thread, and 
>then <http://www.perl.com/> as having links to more.  I've had a chance 
>to check out many of those links and there's some good stuff out there.
>
>"Out there" - that's the problem.  It's not "In here" <looks at the 
>vacant area where a "documentation" folder should exist in his Perl 
>folder>.
>
>Since the content already exists, why not set aside half a meg or so and 
>invite the authors of those tutorials to bundle up and pitch in???

Fine.  Talk to them.  Patches welcome.  I believe you commented
earlier that you feel you have a couple of years to go before you feel
you will know perl well enough to do this sort of thing yourself.  I,
again. disagree.  If you can argue this strongly for it, you should be
able to write it.  If it's not perfect, believe me, there will be
people around to knock it into shape.

Keep in mind that it is a very strong tenet of the perl development
community that patches speak *much* louder than complaints.

best,

dha

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
Mysticism has no place in programming.
	  - Larry Rosler


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

Date: 13 Jun 2000 06:28:46 GMT
From: dha@panix.com (David H. Adler)
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <slrn8kbl4u.9h2.dha@panix6.panix.com>

On Tue, 13 Jun 2000 10:54:40 +0930, Henry <htp@mac.com> wrote:

[I have snipped heavily, due to the fact that I'm responding to a
fairly long post.  Most of it was quoted from previous messages.  I
believe I have retained the gist of the post I respond to - if not, I
apologize]

>Sorry, I didn't mean rig the document itself, I meant "rig it" in a more 
>general sense.  Perhaps the Perl license?  I mean, everything to do with 
>Perl is copyright, even if it's free, so there's gotta be something 
>there we can leverage to protect our collective arse...

[snip]

>More along the lines of...
>
>"Thou shalt not modify the compiler - PERIOD."
[snip]
>OK then, how about...
>
>"Thou shalt not _distribute_ a modified compiler - PERIOD."?
[snip]
>> I don't much see the point, though, honestly. So someone extends perl with
>> new keywords that aren't in the standard. Big deal.
>
>It's a _huge_ deal.  Just ask anyone who has to deliver content on the 
>web.  It's an absolutely _ENORMOUS_ deal!
[snip]
>Gak - how can you dismiss it so lightly!?!

Because Perl *does* have a license.  Two of them, in fact.  And they
specifically allow these things.  I don't believe that the "rigging"
you suggest would be approved by the Larry(tm).  And, that being a
Rule One(tm) kind of thing, that's pretty much makes it a (presumably,
at least on my end) dead issue.

*shrug*

dha
-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
"Perhaps *the* Monty Python Scholar in America today"
	-New Yorker magazine 13mar89


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

Date: Mon, 12 Jun 2000 23:16:07 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Length of an Array
Message-Id: <slrn8kb9rn.1om.tadmc@magna.metronet.com>

On Tue, 13 Jun 2000 00:47:09 GMT, crazyCoder <crazycoder@my-deja.com> wrote:

>I know that $#array will give the length of @array, 


It does not. It gives the index of the last element of the array.

@array in scalar context gives the length of the array.


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


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

Date: Mon, 12 Jun 2000 22:19:43 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Length of an Array
Message-Id: <3945C46F.1B53BB96@stomp.stomp.tokyo>

crazyCoder wrote:
 
> I'm trying to get the length of an array
> stored in a hash, is there a short-cut
> for this?
 
> I know that $#array will give the length of @array...

Others have posted code snippets for you.

* grins *

Yes, $#array does give you a length of
an array, just as $#array+1 gives you a
length of an array.

It's all a matter of perspective and,
perhaps a bit of imagination, a quality
often sorely lacking.

If you are like me and think in terms
of pure mathematics, counting numbers
begin with zero and end with nine. All
numbers beyond this, are variations on
zero through nine, inclusive.

For a casual human perspective, you 
would add one to your array length
to pacify the minds of the doltishly
unimaginative and average people.


@array = ("zero", "one", "two")

$length = ($#array)

Your length is returned as 2 (two)
which is quite correct from a purist
mathematician viewpoint: 0 1 2 

I see three elements there. Others do not.


@array = ("zero", "one", "two")

$length = ($#array+1)

Your length is returned as 3 (three)

mathematician viewpoint: 0 1 2
average human viewpoint: 1 2 3


No wonder most people dislike math.


Anyhow, setting aside oxymoronic mathematical
humor, here is a cute alternative which would 
probably be best for human perspective,

$length = ($#array+1)

Works just like other code posted for you.
However, this code will make you stand out
in a conformist crowd; it's different.


Godzilla!


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

Date: Tue, 13 Jun 2000 06:01:32 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Length of an Array
Message-Id: <x7ln0a86h0.fsf@home.sysarch.com>

>>>>> "G" == Godzilla!  <godzilla@stomp.stomp.tokyo> writes:

  G> Yes, $#array does give you a length of
  G> an array, just as $#array+1 gives you a
  G> length of an array.

you are typically deluded about the meaning of length. what else is new?

  G> It's all a matter of perspective and,
  G> perhaps a bit of imagination, a quality
  G> often sorely lacking.

or a lacking of brains.

  G> $length = ($#array+1)

  G> Works just like other code posted for you.
  G> However, this code will make you stand out
  G> in a conformist crowd; it's different.

now that is a wonderfully moronic take on coding. don't code like
everyone else. be different and harder to understand, slower and more
complex than necessary. you definitely take that philosophy to the
extreme. no wonder your code is so useless and you worship the false
idols of selena sol and redmond.

to the original poster, that last statement alone should tell you why
using @array in a scalar context is correct, because everyone else
correctly uses it and moronzille refuses too. and it is even a perl4
thing and nothing to do with her brain damaged flames on perl5.

just correcting the cracked logic with epoxy. too bad i can't apply it
to her fingers and keyboard as well.

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: Tue, 13 Jun 2000 18:47:46 +1200
From: "Tintin" <you.will.always.find.him.in.the.kitchen@parties>
Subject: Re: Mail via perl
Message-Id: <960878768.992292@shelley.paradise.net.nz>


"Eli Mansour" <elynt@exchange.ml.com> wrote in message
news:39455EF2.53FA77D9@exchange.ml.com...
> Does anybody have an example of sending attachments via Perl.
>
> I don't mind using any mail package from CPAN. Just don't
> see any code to just attach files and send them via email.

You need MIME::Lite

Here's one of the examples:

### Create a new multipart message:
    $msg = MIME::Lite->new(
                 From    =>'me@myhost.com',
                 To      =>'you@yourhost.com',
                 Cc      =>'some@other.com, some@more.com',
                 Subject =>'A message with 2 parts...',
                 Type    =>'TEXT',
                 Data    =>"Here's the GIF file you wanted"
                 );

    ### Attach a part:
    $msg->attach(Type     =>'image/gif',
                 Path     =>'aaa000123.gif',
                 Filename =>'logo.gif'
                 );





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

Date: Tue, 13 Jun 2000 00:41:22 -0700
From: "Trevor" <Trevor@win32c.com>
Subject: Re: NEWBIE cgi question please help!
Message-Id: <3945bb4c@flexnet239.uunt.net>

I've got two words for you FUCK YOU. I should have expected such an anal
response from some idiot. I didnt see a CGI/C newsgroup this was as close as
i could get. since you pay hourly for your phone and internet don't waste
your time posting such anal responses please.

"Drew Simonis" <care227@attglobal.net> wrote in message
news:3944F0B6.AFB574A8@attglobal.net...
> Trevor wrote:
> >
> > This may not be the right place for this question but i'm hoping at
least
> > one of you people out there can help me out.
>
> It certainly isn't.  I'll help you out by telling you the proper
> group.  Good enough?
>
> comp.infosystems.www.authoring.cgi
>
> Do try to stay on topic.  Some of us pay hourly for our Internet
> connections _and_ phone connections.




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

Date: 13 Jun 2000 06:38:50 GMT
From: dha@panix.com (David H. Adler)
Subject: Re: NEWBIE cgi question please help!
Message-Id: <slrn8kblnq.9h2.dha@panix6.panix.com>

On Tue, 13 Jun 2000 00:41:22 -0700, Trevor <Trevor@win32c.com> wrote:
>I've got two words for you FUCK YOU. I should have expected such an anal
>response from some idiot. I didnt see a CGI/C newsgroup this was as close as
>i could get. since you pay hourly for your phone and internet don't waste
>your time posting such anal responses please.

Ah.  You posted something completely off-topic, and *he's* the idiot.
Of course.  :-|

You may not have seen a "CGI/C" group, but I find it mind-boggling
that you couldn't find a group that deals with either CGI or C.  It's
also astounding that you seem to have thought that a group that has
*neither* as its topic was "as close as" you could get.

So, you posted inappropriately, and were quite rude in response to
someone who told you so but was good enough to tell you where you
*would* find appropriate help.

I do not see this as very useful to you or to anyone else.

dha

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
He looked like Elvis '75 - Puffed up but still alive
	- The Merrymakers, "Superstar"


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

Date: Tue, 13 Jun 2000 18:50:09 +1200
From: "Tintin" <you.will.always.find.him.in.the.kitchen@parties>
Subject: Re: NEWBIE cgi question please help!
Message-Id: <960878911.712047@shelley.paradise.net.nz>


"Trevor" <Trevor@win32c.com> wrote in message
news:3945bb4c@flexnet239.uunt.net...
> I've got two words for you FUCK YOU. I should have expected such an anal
> response from some idiot. I didnt see a CGI/C newsgroup this was as close
as
> i could get. since you pay hourly for your phone and internet don't waste
> your time posting such anal responses please.

And you seriously expect help now?




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

Date: Mon, 12 Jun 2000 21:04:24 -0700
From: Perl Discussion <jmourneyNOjmSPAM@hotmail.com.invalid>
Subject: NT versus Unix
Message-Id: <342fca98.dfc4c2c7@usw-ex0101-008.remarq.com>

can someone help me decide which platform should I choose?

We are developing a web-based client-server type of application
that requires some kind of relational database (also undecided).
What we already decided was we are going to use Perl as its core.

a comparison of both platforms (advantage-disadvantage) would be
really helpful.

thank you in advance!

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



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

Date: Mon, 12 Jun 2000 23:40:36 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: NT versus Unix
Message-Id: <slrn8kbb9k.1sn.tadmc@magna.metronet.com>

On Mon, 12 Jun 2000 21:04:24 -0700, Perl Discussion <jmourneyNOjmSPAM@hotmail.com.invalid> wrote:
>can someone help me decide which platform should I choose?

Unix.

>We are developing a web-based client-server type of application
>that requires some kind of relational database (also undecided).
>What we already decided was we are going to use Perl as its core.
>
>a comparison of both platforms (advantage-disadvantage) would be
>really helpful.


a comparison of both platforms would be off-topic here in
the Perl newsgroup.


OS wars should be fought in comp.os.* newsgroups.


_Language_ wars can be tried here, but we've already won
in your case  :-)


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


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

Date: 13 Jun 2000 04:46:52 GMT
From: nj_kanda@alcor.concordia.ca (Neil Kandalgaonkar)
Subject: Perl + web history (was: Re: ANSI Perl: No Way !!!)
Message-Id: <8i4ebs$7da$1@newsflash.concordia.ca>

In article <B56B186C.6078%elaine@chaos.wustl.edu>,
Elaine Ashton  <elaine@chaos.wustl.edu> wrote:

>>> 18.Oct.94 - Perl 5.000 released
>>> 23.May.95 - JAVA Announced by Sun Microsystems
>>> I couldn't find a date for ASP but considering
>>> how late in the game MS 'discovered' the Internet,
>>> I'd guess it would have debuted ~96.

I'm not familiar with Microsoft products either but I have 
long heard about the precursor to ASP which was apparently
well-hated.

It seems that IIS 1.0 shipped with "IDC/HTX". This might be 
it. These appear to be ways of tying an HTML template to an
ODBC source.

ASP was introduced somewhere between IIS 2.0 and IIS 3.0,
I found some IDC->ASP conversion utilities published circa 
1997.

A couple of other tidbits for the perl timeline:

httpd.pl, by Marc VanHeyningen  project abandoned(?) March 1993
<http://www.cs.indiana.edu/perl-server/intro.html>

A complete HTTP/1.0-compliant and extensible web server, written
in perl and extensible by adding perl code. A templating system
would have been trivial to hack if anyone had wanted it at the time.

Plexus (1993-1995?) was a successor to this project. Some guy
named Nathan Torkington is credited in the WHOSWHO file for 
creating an OED->WWW gateway.
<http://www.earth.com/server/doc/plexus.html>
 
1996: Doug MacEachern introduces mod_perl, which embeds a perl
interpreter into an Apache module. (source: Writing Apache Modules
with Perl and C, by Lincoln Stein & Doug MacEachern, O'Reilly,
1999).

These READMEs fill me with nostalgia for the early 90s. All the
ideas that are just barely coming into the mainstream today, like
using an HTTP server as a generic remote procedure system,
are discussed. It's amazing how boring things got from 1996-2000.
Coinciding with dot-com fever and Microsoft's entry into the field.

It seems some things never change, though...

"Despite the use of a language some think of as a ``scripting'' 
 language, this is a real server and handles real tasks."
     -- Marc Van Heyningen, 1993 


>There are plenty of idiots making ugly web pages but wouldn't
>giving them a tool to allow them to make reasonable pages instead
>of wasting so much time bitching at them be more productive?

Conflating two things here. A better internet will not improve
human nature, only *maybe* help realize its potential. 

Why write tools for idiots anyway? That's MS's job, to give them
little wizards and crap to put up a personal page in 10 seconds
flat, never mind the question of what to write.

I would get into a longer rant about the philosophical underpinnings
of MS software (and to some extent, Linux and GNOME as they rush
to copy their approach). But F-Train said it much better than me. 

<http://ftrain.com/index.php3?id=15&xection_id=1&show=10000>

-- 
Neil Kandalgaonkar
neil@brevity.org


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

Date: Tue, 13 Jun 2000 07:03:05 +0100
From: "James" <fromnews@pagepool.co.uk>
Subject: Re: Place to run programs
Message-Id: <8i4ira$4tk$1@gxsn.com>

Thank you if you gave a sensible answer.
"Steve Leibel" <stevel@coastside.net> wrote in message
news:stevel-1206001627180001@192.168.100.2...
> In article <q9oaks06mn8bshehrkosib44ukq0p441q6@4ax.com>, Abe Timmerman
> <abe@ztreet.demon.nl> wrote:
>
> > On Mon, 12 Jun 2000 21:38:02 +0100, "James" <fromnews@pagepool.co.uk>
> > wrote:
> >
> > > I am completely new to perl - I got my first book this evening.  Can
anyone
> > > tell me where I can run the programs on a Windows 98 PC?
> >
> > at home?
>
>
> Hell no that cuts into valuable TV time.  I'd do it at work.




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

Date: Tue, 13 Jun 2000 05:57:01 +0200
From: martin@radiogaga.harz.de (Martin Vorlaender)
Subject: Re: PLEASE HELP: Perl for WWW
Message-Id: <3945b10d.524144494f47414741@radiogaga.harz.de>

[O'Reilly's CGI Programming]

Jon S. (jonceramic@nospammiesno.earthlink.net) wrote:
: martin@radiogaga.harz.de (Martin Vorlaender) wrote:
: >The 2nd edition is on its way, see http://www.oreilly.com/catalog/cgi2/
:
: Any idea if it will actually ship in July?

Sorry, no. All I know is that the german edition will follow ASAP,
as I've been asked to proofread the translation.

cu,
  Martin
--
                       |  Martin Vorlaender  |  VMS & WNT programmer
  OpenVMS: When you    |  work: mv@pdv-systeme.de
  KNOW where you want  |        http://www.pdv-systeme.de/users/martinv/
  to go today.         |  home: martin@radiogaga.harz.de


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

Date: Tue, 13 Jun 2000 06:46:16 GMT
From: "unknown" <unknown@hfx.com>
Subject: ppm will not work. I get this error message.
Message-Id: <YMk15.126$hk6.17297@sapphire.mtt.net>

Can't locate HTML/HeadParser.pm in @INC (@INC contains: C:/Perl/lib
/lib .) at C:/Perl/site/lib/LWP/Protocol.pm line 47.
Compilation failed in require at C:/Perl/site/lib/LWP/UserAgent.pm
BEGIN failed--compilation aborted at C:/Perl/site/lib/LWP/UserAgent

Compilation failed in require at C:/Perl/site/lib/PPM.pm line 8.
BEGIN failed--compilation aborted at C:/Perl/site/lib/PPM.pm line 8
Compilation failed in require at C:\Perl\bin\ppm.bat line 21.
BEGIN failed--compilation aborted at C:\Perl\bin\ppm.bat line 21.


My system is win2000.




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

Date: Mon, 12 Jun 2000 21:14:05 -0700
From: "Gabe" <grichards@flashcom.net>
Subject: Simple RegEx
Message-Id: <skbd371jh5111@corp.supernews.com>

This is easy, I just don't know much about RegEx yet.

$gettbldef->[$i]->[1] equals something like char(15);

I want to set $fldsize{$fldname[$i]} to the number (15).

I was using:

  $fldsize{"$fldnames[$i]"} = ($tbldef->[$i]->[1] =~ /\d*/);

but that just sets the hash value to 1, not 15.

So basically, what's the expression to match and return all digits in a
string?

Thanks,
Gabe





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

Date: Tue, 13 Jun 2000 00:15:42 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Simple RegEx
Message-Id: <slrn8kbdbe.1va.tadmc@magna.metronet.com>

On Mon, 12 Jun 2000 21:14:05 -0700, Gabe <grichards@flashcom.net> wrote:

>This is easy, I just don't know much about RegEx yet.


A pattern match evaluates to a Boolean value. True if it matched,
false if it could not match.


>$gettbldef->[$i]->[1] equals something like char(15);


I do not know what char(15) means.

What does char(15) mean?

Why are you trying to say it in natural language?

In Perl, we say that:

   $gettbldef->[$i]->[1] = '15';  # if char(15) means a string


>I want to set $fldsize{$fldname[$i]} to the number (15).
>
>I was using:
>
>  $fldsize{"$fldnames[$i]"} = ($tbldef->[$i]->[1] =~ /\d*/);
            ^             ^

Those quotes serve no purpose.

So they should not be there.


>but that just sets the hash value to 1, not 15.


A pattern match evaluates to a Boolean value. True if it matched,
false if it could not match.

Looks like you got a "true" for the result of your pattern match.

>So basically, what's the expression to match and return all digits in a
>string?


   my $result = $1 if $gettbldef->[$i]->[1] =~ /(\d*)/;


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


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

Date: Tue, 13 Jun 2000 00:46:25 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Simple RegEx
Message-Id: <slrn8kbf51.222.tadmc@magna.metronet.com>

On Tue, 13 Jun 2000 00:15:42 -0400, Tad McClellan <tadmc@metronet.com> wrote:
>On Mon, 12 Jun 2000 21:14:05 -0700, Gabe <grichards@flashcom.net> wrote:
>
>>This is easy, I just don't know much about RegEx yet.

>>I was using:
>>
>>  $fldsize{"$fldnames[$i]"} = ($tbldef->[$i]->[1] =~ /\d*/);

>>but that just sets the hash value to 1, not 15.

>Looks like you got a "true" for the result of your pattern match.


BTW, you will get a true for ANY value of $tbldef->[$i]->[1] !

You specified zero or more digit chars. 

*Every* string has zero digit chars.


If you want to match digit chars, you should require at least
one digit char.


>>So basically, what's the expression to match and return all digits in a
>>string?
>
>
>   my $result = $1 if $gettbldef->[$i]->[1] =~ /(\d*)/;


So make that:

   my $result = $1 if $gettbldef->[$i]->[1] =~ /(\d+)/;


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


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

Date: Mon, 12 Jun 2000 22:56:09 -0700
From: "Gabe" <grichards@flashcom.net>
Subject: Re: Simple RegEx
Message-Id: <skbj2ic1h5139@corp.supernews.com>

> >So basically, what's the expression to match and return all digits in a
> >string?
>
>
>    my $result = $1 if $gettbldef->[$i]->[1] =~ /(\d*)/;

Thanks for the advice and help. But this still isn't working for me. My code
stands at:

$val = 'int(11)';
$fldnames[$i] = 'prosid';
$fldsize{$fldnames[$i]} = $1 if $val =~ /(\d*)/;
print $1; #$1 is empty!

Gabe








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

Date: Mon, 12 Jun 2000 23:07:57 -0700
From: "Gabe" <grichards@flashcom.net>
Subject: Re: Simple RegEx
Message-Id: <skbjom7uh51146@corp.supernews.com>


Tad McClellan <tadmc@metronet.com> wrote in message

> So make that:
>
>    my $result = $1 if $gettbldef->[$i]->[1] =~ /(\d+)/;

That did it! Thanks!

Gabe




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

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


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