[16896] in Perl-Users-Digest
Perl-Users Digest, Issue: 4308 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Sep 13 03:05:30 2000
Date: Wed, 13 Sep 2000 00:05:11 -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: <968828711-v9-i4308@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 13 Sep 2000 Volume: 9 Number: 4308
Today's topics:
Re: Aliasing refs <philipg@atl.mediaone.net>
Re: Aliasing refs <jeffp@crusoe.net>
Re: Aliasing refs <elephant@squirrelgroup.com>
Re: cross-platform archive mgt <elephant@squirrelgroup.com>
Re: cross-platform archive mgt <davids@YYYYdesertigloo.com>
Re: cross-platform archive mgt <elephant@squirrelgroup.com>
Re: cross-platform archive mgt (Logan Shaw)
E-Commerce scripts <splezunk@usa.net>
Re: E-Commerce scripts <fgeiger@datec.at>
email form script <skyhigh@aviation-worldwide.com>
Re: email form script <elephant@squirrelgroup.com>
Re: Finding maximum length <yanick@babyl.sympatico.ca>
Re: Finding maximum length <jeffp@crusoe.net>
Re: Finding maximum length <elephant@squirrelgroup.com>
Re: Finding maximum length (Sean McAfee)
Re: Help with perl/cgi (using book: perl,cgi, and javas <peterp100@hotmail.com>
Re: If you can write this script or help out let me kno (Valkhorn)
Is there a more elegant way? (Sean McAfee)
Newbie - Where can I run my Perl code <jimve@ yahoo.com>
Re: Newbie - Where can I run my Perl code <elephant@squirrelgroup.com>
Re: Newbie to CGI <peter.sundstrom@eds.com>
OFF TOPIC IGNORE Re: killfiles? scores? I wish I had <godzilla@stomp.stomp.tokyo>
Perl script printing to MAIL header <eirik@netmaking.com>
Re: Perl script printing to MAIL header (Gwyn Judd)
Re: Perl vs. Java or C++ (Jon Bell)
Re: Qualifications for new Perl programmer????? <godzilla@stomp.stomp.tokyo>
Simple newbie question ranskaboss@my-deja.com
Re: Simple newbie question <elephant@squirrelgroup.com>
Re: Where Doesn't this work? <godzilla@stomp.stomp.tokyo>
Re: Where Doesn't this work? <wyzelli@yahoo.com>
Re: Where Doesn't this work? <godzilla@stomp.stomp.tokyo>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 13 Sep 2000 04:20:01 GMT
From: "Philip Garrett" <philipg@atl.mediaone.net>
Subject: Re: Aliasing refs
Message-Id: <RfDv5.2710$IV1.753493@typhoon.southeast.rr.com>
jason <elephant@squirrelgroup.com> wrote in message
news:MPG.14299916519e6e869897a0@localhost...
> Philip Garrett <philipg@atl.mediaone.net> wrote ..
[snip]
> and then $hash2{var} refers to $hash1{var} .. taking this one step
> further using the reference you will get
>
> *hash = \%$hashref;
Perfect. Don't know why I didn't try the dereference before... I was trying
all kinds of other gobbledeygook.
Thanks,
p
------------------------------
Date: Wed, 13 Sep 2000 00:35:31 -0400
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: Aliasing refs
Message-Id: <Pine.GSO.4.21.0009130034500.10747-100000@crusoe.crusoe.net>
On Sep 13, Philip Garrett said:
>jason <elephant@squirrelgroup.com> wrote in message
>news:MPG.14299916519e6e869897a0@localhost...
>> Philip Garrett <philipg@atl.mediaone.net> wrote ..
>[snip]
>> and then $hash2{var} refers to $hash1{var} .. taking this one step
>> further using the reference you will get
>>
>> *hash = \%$hashref;
>
>Perfect. Don't know why I didn't try the dereference before... I was trying
>all kinds of other gobbledeygook.
There's an extra layer of indirection there.
*hash = \%$hashref;
should just be
*hash = $hashref;
--
Jeff "japhy" Pinyan japhy@pobox.com http://www.pobox.com/~japhy/
PerlMonth - An Online Perl Magazine http://www.perlmonth.com/
The Perl Archive - Articles, Forums, etc. http://www.perlarchive.com/
CPAN - #1 Perl Resource (my id: PINYAN) http://search.cpan.org/
------------------------------
Date: Wed, 13 Sep 2000 16:01:43 +1100
From: jason <elephant@squirrelgroup.com>
Subject: Re: Aliasing refs
Message-Id: <MPG.1429a731590bd4869897a5@localhost>
Jeff Pinyan <jeffp@crusoe.net> wrote ..
>On Sep 13, Philip Garrett said:
>
>>jason <elephant@squirrelgroup.com> wrote in message
>>news:MPG.14299916519e6e869897a0@localhost...
>>> Philip Garrett <philipg@atl.mediaone.net> wrote ..
>>[snip]
>>> and then $hash2{var} refers to $hash1{var} .. taking this one step
>>> further using the reference you will get
>>>
>>> *hash = \%$hashref;
>>
>>Perfect. Don't know why I didn't try the dereference before... I was trying
>>all kinds of other gobbledeygook.
>
>There's an extra layer of indirection there.
>
> *hash = \%$hashref;
>
>should just be
>
> *hash = $hashref;
hee hee .. too funny .. thanks Jeff
--
jason -- elephant@squirrelgroup.com --
------------------------------
Date: Wed, 13 Sep 2000 15:16:05 +1100
From: jason <elephant@squirrelgroup.com>
Subject: Re: cross-platform archive mgt
Message-Id: <MPG.14299c837d0d85a39897a2@localhost>
David P. Schwartz <davids@YYYYdesertigloo.com> wrote ..
>Are there any Perl language plugins or libraries for handling Zip archives?
that's it .. it's time to coin a new acronym for a self-answering-
question - SAQ
for ALL module type questions that you have you should go to CPAN ..
http://www.cpan.org/ .. it has a search tool - http://search.cpan.org/
in which you can type words like 'zip' and 'archive'
you will find such gems as
Archive::Zip
--
jason -- elephant@squirrelgroup.com --
------------------------------
Date: Tue, 12 Sep 2000 22:57:06 -0700
From: "David P. Schwartz" <davids@YYYYdesertigloo.com>
Subject: Re: cross-platform archive mgt
Message-Id: <39BF1732.1B252560@YYYYdesertigloo.com>
Thanks for the pointer.
FYI: at search.cpan.org, entering: "zip archive" into the search box yields: "No
modules found matching 'zip archive' ". Ditto for "archive zip".
However, typing "archive::zip" into the search box yielded something more
useful.
So, thank you for the specific tip!
-David
ps: as far as being an SAQ goes, consider this: most of the searches I've done
for this using as many as eight keywords have been turning up over 10,000 hits.
I'm surprized to get zero hits with only two keywords on cpan, especially when
both of them should score 100% on substring matches. Here I posted one query,
and I got one direct hit. Wow! Search engines are still no match for the human
brain! :-) The problem is that a very high percentage of archives are
distributed in "zip" format, and most of them score a match in the searches.
Everything is distributed as an "archive", which makes that keyword pretty
useless. Plugin, library, management, perl, ... there's just no way to
distinguish in this case that I want to query about the USE of the thing, rather
than its raw properties.
jason wrote:
> David P. Schwartz <davids@YYYYdesertigloo.com> wrote ..
> >Are there any Perl language plugins or libraries for handling Zip archives?
>
> that's it .. it's time to coin a new acronym for a self-answering-
> question - SAQ
>
> for ALL module type questions that you have you should go to CPAN ..
> http://www.cpan.org/ .. it has a search tool - http://search.cpan.org/
> in which you can type words like 'zip' and 'archive'
>
> you will find such gems as
>
> Archive::Zip
>
> --
> jason -- elephant@squirrelgroup.com --
------------------------------
Date: Wed, 13 Sep 2000 17:14:06 +1100
From: jason <elephant@squirrelgroup.com>
Subject: Re: cross-platform archive mgt
Message-Id: <MPG.1429b825f43c8829897a6@localhost>
David P. Schwartz <davids@YYYYdesertigloo.com> wrote ..
>jason wrote:
>
>> David P. Schwartz <davids@YYYYdesertigloo.com> wrote ..
>> >Are there any Perl language plugins or libraries for handling Zip archives?
>>
>> that's it .. it's time to coin a new acronym for a self-answering-
>> question - SAQ
>>
>> for ALL module type questions that you have you should go to CPAN ..
>> http://www.cpan.org/ .. it has a search tool - http://search.cpan.org/
>> in which you can type words like 'zip' and 'archive'
>>
>> you will find such gems as
>>
>> Archive::Zip
>
-
>FYI: at search.cpan.org, entering: "zip archive" into the search box yields: "
>modules found matching 'zip archive' ". Ditto for "archive zip".
better to keep it to single words - as I suggested .. typing either of
the two words 'archive' or 'zip' into the search would have brought up
the desired search results
>ps: as far as being an SAQ goes, consider this: most of the searches I've done
>for this using as many as eight keywords have been turning up over 10,000 hits.
the SAQ thing wasn't a dig at you (if it was then you wouldn't have got
an answer) .. it was just a sort of in joke
your question was perfectly reasonable .. just amusingly self-answering
[ jeopardectomy performed and lines exceeding 80 chars truncated ]
--
jason -- elephant@squirrelgroup.com --
------------------------------
Date: 13 Sep 2000 01:54:25 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: cross-platform archive mgt
Message-Id: <8pn8b1$46a$1@provolone.cs.utexas.edu>
In article <MPG.14299c837d0d85a39897a2@localhost>,
jason <elephant@squirrelgroup.com> wrote:
>David P. Schwartz <davids@YYYYdesertigloo.com> wrote ..
>>Are there any Perl language plugins or libraries for handling Zip archives?
>
>that's it .. it's time to coin a new acronym for a self-answering-
>question - SAQ
O.K., I don't get the self-answering question thing.
Just because a question contains all or most of the words necessary to
answer it doesn't make the question stupid or the answer obvious.
For instance, which of the following questions are self-answering?
a. What is the name of Peter Case's first album?
b. What is the name of Bruce Cockburn's first album?
c. What is the name of T-Bone Burnett's first album?
Well, it turn out that "a" and "b" are, but "c" isn't. All three
artists have released eponymous albums, but T-Bone's eponymous one was
not his first. (It was his 3rd, 4th, 5th, or 6th, depending on whether
you count EPs and/or albums released under the name J. Henry Burnett.)
Anyway, my point is that the fact that the question contains the answer
doesn't necessarily mean the question is answered.
- Logan
------------------------------
Date: Wed, 13 Sep 2000 15:29:39 +1100
From: "Splezunk" <splezunk@usa.net>
Subject: E-Commerce scripts
Message-Id: <39bf02a9@isupx1.isd.tafensw.edu.au>
Hi all,
I am currently learning Perl to the end of setting up a little e-commerce
site. Do any of you have any ideas on what the best scripts to use are. As
far as I have seen there is the S-Mart, Smartshop and Perlshop. Are there
any other freebies available. It would be nice to have a good base script
to work from, as I really do not feel like writing the thing from scratch.
Thanks
Zunk
PS. Flat file access is preferable over database access.
------------------------------
Date: Wed, 13 Sep 2000 08:00:34 +0200
From: "Franz GEIGER" <fgeiger@datec.at>
Subject: Re: E-Commerce scripts
Message-Id: <8pn55q$l38$1@pollux.ip-plus.net>
I worked with Selena Sol's Webshop last year. Found it a professional
solution. There is a book also: Birznieks & Sol: CGI for Commerce. M&T
Books.
Regards
Franz GEIGER
Splezunk <splezunk@usa.net> schrieb in im Newsbeitrag:
39bf02a9@isupx1.isd.tafensw.edu.au...
> Hi all,
>
> I am currently learning Perl to the end of setting up a little e-commerce
> site. Do any of you have any ideas on what the best scripts to use are.
As
> far as I have seen there is the S-Mart, Smartshop and Perlshop. Are there
> any other freebies available. It would be nice to have a good base script
> to work from, as I really do not feel like writing the thing from scratch.
>
> Thanks
> Zunk
>
> PS. Flat file access is preferable over database access.
>
>
>
------------------------------
Date: Wed, 13 Sep 2000 17:53:25 +1200
From: "Nathan Currie" <skyhigh@aviation-worldwide.com>
Subject: email form script
Message-Id: <968824593.825591@Chaos.es.co.nz>
I have a need for a cgi/perl script that will take a forms data, then
generate an email.
Scenario
Customer comes to my site and wants to subscribe to our mailing list.
Customer enters their email address in the form and submits it.
The script gets the information, strips the customers email address and then
generates and email to our mailing list with
From: customeremailaddress@wherever.com
To: mailinglist-request@mycompany.com
Subject: SUBSCRIBE
Body: <empty>
I would also like the script to take an additional fields data of 'Subscribe
or Unsubscribe' and also redirect the customer to a 'thankyou' page when
completed. But i'll take just the basics if need be.
Thanks in advance for your help.
Nathan Currie
www.aviation-worldwide.com
------------------------------
Date: Wed, 13 Sep 2000 17:20:54 +1100
From: jason <elephant@squirrelgroup.com>
Subject: Re: email form script
Message-Id: <MPG.1429b9c6a196c6f19897a8@localhost>
Nathan Currie <skyhigh@aviation-worldwide.com> wrote ..
>I have a need for a cgi/perl script that will take a forms data, then
>generate an email.
>
>Scenario
>
>Customer comes to my site and wants to subscribe to our mailing list.
>Customer enters their email address in the form and submits it.
>
>The script gets the information, strips the customers email address and then
>generates and email to our mailing list with
>
>From: customeremailaddress@wherever.com
>To: mailinglist-request@mycompany.com
>Subject: SUBSCRIBE
>Body: <empty>
>
>I would also like the script to take an additional fields data of 'Subscribe
>or Unsubscribe' and also redirect the customer to a 'thankyou' page when
>completed. But i'll take just the basics if need be.
thanks for letting us know your needs, wants and preferences .. now -
what's your Perl question ?
--
jason -- elephant@squirrelgroup.com --
------------------------------
Date: Wed, 13 Sep 2000 04:31:16 GMT
From: Yanick Champoux <yanick@babyl.sympatico.ca>
Subject: Re: Finding maximum length
Message-Id: <oqDv5.8781$Kp4.344622@news20.bellglobal.com>
greg_sands@my-deja.com wrote:
: I'm trying to find the maximum length of the elements of an array. Both
: of the following work, but can anyone come up with a simpler or more
: elegant solution?
: ===
: my $maxlen=0;
: foreach my $element (@array) {
: if ($maxlen < length($element)) {
: $maxlen = length($element);
: }
: }
: ===
: my $maxlen = (sort {$a <=> $b} map {length} @array)[-1];
: ===
: Any other ideas?
: Greg
From the wacky department:
1while++$l,grep/.{$l}./,@a;
print $l;
Joy,
Yanick
--
$_= "e nte elhce.rka rPrhoatY"; @nothing = ( '', '' );
s#(.)(.*)(.)#$2#g and ($\,$,)=($1,$3) and print @nothing
while $_;
------------------------------
Date: Wed, 13 Sep 2000 00:36:24 -0400
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: Finding maximum length
Message-Id: <Pine.GSO.4.21.0009130035510.10747-100000@crusoe.crusoe.net>
On Sep 13, jason said:
>Jeff Pinyan <jeffp@crusoe.net> wrote ..
>>[posted & mailed]
>>
>>On Sep 13, greg_sands@my-deja.com said:
>>
>>>I'm trying to find the maximum length of the elements of an array. Both
>>>of the following work, but can anyone come up with a simpler or more
>>>elegant solution?
>>>
>> $len < $_ and ($len = $_) for @array;
>
>I thought the originator was after the element with the longest length -
>not the numerically largest element
s'$_'length'g;
--
Jeff "japhy" Pinyan japhy@pobox.com http://www.pobox.com/~japhy/
PerlMonth - An Online Perl Magazine http://www.perlmonth.com/
The Perl Archive - Articles, Forums, etc. http://www.perlarchive.com/
CPAN - #1 Perl Resource (my id: PINYAN) http://search.cpan.org/
------------------------------
Date: Wed, 13 Sep 2000 16:00:12 +1100
From: jason <elephant@squirrelgroup.com>
Subject: Re: Finding maximum length
Message-Id: <MPG.1429a6d2fac0aab29897a4@localhost>
Jeff Pinyan <jeffp@crusoe.net> wrote ..
>On Sep 13, jason said:
>
>>Jeff Pinyan <jeffp@crusoe.net> wrote ..
>>>[posted & mailed]
>>>
>>>On Sep 13, greg_sands@my-deja.com said:
>>>
>>>>I'm trying to find the maximum length of the elements of an array. Both
>>>>of the following work, but can anyone come up with a simpler or more
>>>>elegant solution?
>>>>
>>> $len < $_ and ($len = $_) for @array;
>>
>>I thought the originator was after the element with the longest length -
>>not the numerically largest element
>
> s'$_'length'g;
now you're left with $len containing the longest length .. not the
element *with* the longest length
--
jason -- elephant@squirrelgroup.com --
------------------------------
Date: Wed, 13 Sep 2000 06:10:09 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: Finding maximum length
Message-Id: <5TEv5.3168$O5.63702@news.itd.umich.edu>
In article <8pmkss$1it$1@nnrp1.deja.com>, <greg_sands@my-deja.com> wrote:
>I'm trying to find the maximum length of the elements of an array.
Here's an idiom I like:
sub maximum (&@) {
my $sub = shift;
my ($max, $value);
foreach (@_) {
$value = $sub->();
!defined $max || $max < $value and $max = $value;
}
$max;
}
my $maxlen = maximum { length } @array;
--
Sean McAfee mcafee@umich.edu
print eval eval eval eval eval eval eval eval eval eval eval eval eval eval
q!q@q#q$q%q^q&q*q-q=q+q|q~q:q? Just Another Perl Hacker ?:~|+=-*&^%$#@!
------------------------------
Date: Wed, 13 Sep 2000 03:19:54 -0400
From: peter <peterp100@hotmail.com>
Subject: Re: Help with perl/cgi (using book: perl,cgi, and javascript complete)
Message-Id: <b2aurs4973vqkmuc0jtlt40ubr37ucjvej@4ax.com>
I get "not found"
when I try to use the "geturl.pl" cgi program working.
The program also had the perl "require" command, requiring a file
called html.pl, what's funny is that there is no mention of what this
file does or where it is, and guess what, it's not on my system.
What's also funny is the directory pub/scripts/perl-cgi/[html.pl] is
not there.
Granted, maybe under Unix, it exist, but no version of perl I've ever
used had a package called html.pl. This book is looking worse and
worse...
I love all these books on perl and linux, they really make sense...
Can you point me to any book that is well written and worth the paper
it is written on, I'm really tired of getting ripped off everytime I
buy a computer book.
>peter <peterp100@hotmail.com> wrote:
>> Also, is anyone can point me to any documentation on running CGI
>> scripts using mandrake 7.1 (red-hat) and perl, that would be great.
>> Right now, I'm having problems getting scripts running, like counters
>> and guest books.
>
>Every Mandrake linux installation I've run (6.1 and 7.0 so far) have had
>a fully functional perl out-of-the-box. The only thing that needed
>tweaking was Apache to run CGI's the way I wanted. If you're having
>trouble running CGI scripts, see if you can run non-CGI perl scripts
>from the shell. If that works, then you have a server config problem
>and should post in the appropriate NG.
>
>What's the code that chokes? What are the errors? the tail of
>error_log?
------------------------------
Date: 13 Sep 2000 04:26:23 GMT
From: valkhorn@aol.com (Valkhorn)
Subject: Re: If you can write this script or help out let me know
Message-Id: <20000913002623.19556.00000346@ng-fm1.aol.com>
Umm thanks for the sarcasm but it wont be the same info, it will be better.
If one pulls from 5 or so independent resources and gets their info and
compiles it it's automatically better...
Duh... and BTW I appreciate your honesty although if you felt that way why did
you bother to post?
------------------------------
Date: Wed, 13 Sep 2000 06:34:26 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Is there a more elegant way?
Message-Id: <SdFv5.3169$O5.63644@news.itd.umich.edu>
I wrote a function that essentially looks like this:
sub myfunc {
my ($arg1, $arg2) = @_;
local $_ = get_data($arg1, $arg2); # This function may return
# a very large scalar.
otherfunc(); # This function modifies $_.
return $_;
}
I'll generally know before calling myfunc whether the scalar that will be
returned will be very large or not. I want to reduce unnecessary copying of
large blocks of memory, so I decided I wanted to optionally be able to pass
an extra argument to myfunc--call it $target--which could be aliased to $_,
so the "$_ = get_data()" statement assigns directly to $target. In this
case nothing would be returned from the function.
I produced a solution, but I'm wondering if it could be made to look more
elegant. Can someone suggest a better way?
sub myfunc {
my ($arg1, $arg2) = @_;
my ($target, $usetarget) = (\$_[2], @_ >= 3);
local *_;
*_ = $target if $usetarget;
$_ = get_data($arg1, $arg2);
otherfunc();
return if $usetarget;
return $_;
}
--
Sean McAfee mcafee@umich.edu
print eval eval eval eval eval eval eval eval eval eval eval eval eval eval
q!q@q#q$q%q^q&q*q-q=q+q|q~q:q? Just Another Perl Hacker ?:~|+=-*&^%$#@!
------------------------------
Date: Tue, 12 Sep 2000 23:51:27 -0400
From: "Jim Verzino" <jimve@ yahoo.com>
Subject: Newbie - Where can I run my Perl code
Message-Id: <8pmue2$qgf$1@bob.news.rcn.net>
My ISP does not support Perl or CGI scripts with the measly 1 Mb of space
they give me for a web page. I am trying to learn perl but need a place to
upload my code and run it. I am totally new and starting from scratch here.
Any help greatly appreciated.
Jim V.
------------------------------
Date: Wed, 13 Sep 2000 15:17:46 +1100
From: jason <elephant@squirrelgroup.com>
Subject: Re: Newbie - Where can I run my Perl code
Message-Id: <MPG.14299ce331e7885b9897a3@localhost>
"Jim Verzino" <jimve@ yahoo.com> <"Jim Verzino" <jimve@ yahoo.com>>
wrote ..
>My ISP does not support Perl or CGI scripts with the measly 1 Mb of space
>they give me for a web page. I am trying to learn perl but need a place to
>upload my code and run it. I am totally new and starting from scratch here.
you can run Perl on your Windows machine
http://www.activestate.com/
install ActivePerl .. and then go to your Programs menu and read the
ActivePerl documentation .. it tells you everything you could possibly
want to know
--
jason -- elephant@squirrelgroup.com --
------------------------------
Date: Wed, 13 Sep 2000 16:10:11 +1200
From: "Peter Sundstrom" <peter.sundstrom@eds.com>
Subject: Re: Newbie to CGI
Message-Id: <8pmuvr$6qb$1@hermes.nz.eds.com>
Tigz wrote in message ...
>HI, I'm totally new to CGI, I have got a few cgi applications working, but
i
>cant seem to get a counter working.
>When i call the counter useing ssi i get the following message:
>"[an error occurred while processing this directive] "
>could someone please explane to me what i am doing wrong.
This is not a Perl question. To find the error, you will have to look in
the webserver error log.
------------------------------
Date: Tue, 12 Sep 2000 21:07:02 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: OFF TOPIC IGNORE Re: killfiles? scores? I wish I had these luxuries
Message-Id: <39BEFD66.9C6CE7B9@stomp.stomp.tokyo>
Jeff Pinyan wrote:
> Sorry if this is off-topic, but I use the meager PINE, and I don't think I
> have the ability to kill-file people or score postings. What news readers
> are you folks using?
Consider yourself intellectually lucky. I have killfile ability
but never use a killfile. I do mean never. My eyes serve well
for a filter, better than a killfile. Use of killfiles is for
weenies and bigots.
I say weenies because killfile people are those who cannot
cope with whatever life tosses out, good, bad or indifferent.
Three monkey syndrome, hear no.. see no.. problem is, killfile
people are quite often trolls and don't practice, monkey speak no...
Weenies because these people want a safe secure little world
with everything their way, a fantasy world of kissy kissy,
all is nice, all is my way, if not, I WILL SEND IN MY STORM
TROOPERS TO DESTROY! Sorry. A lot of petty wanna be dictators
running around loose in life.
Bigots for a good reason. If you have a person killfiled, which
is usually done for the lamest of reasons, when you read a response
to a killfiled person's article, you are only reading one side of
a conversation and, most often, a hateful side of a conversation.
You read hatred, your own hatred is fortified. You become more of
a bigot. Being a bigot, is a hard position to defend, rationally.
This newsgroup, like almost all newsgroups, is overflowing with
hateful bigots, even some racists. Nothing new, nothing exceptional.
Consider yourself lucky. Consider yourself capable of dealing with
whatever comes your way, least in a newsgroup.
Oxymoronic, those who killfile me, are serving me a favor. Usually,
I don't have to read their idiotic blatherings and, most killfile
people, are borderline idiots if not outright idiots.
Killfiles are for weenies and bigots.
Godzilla!
--
print "http://3483852801/%7e%63%61ll%67i%72l";
------------------------------
Date: Wed, 13 Sep 2000 07:08:14 +0200
From: "Eirik Johansen [netmaking.com]" <eirik@netmaking.com>
Subject: Perl script printing to MAIL header
Message-Id: <39BF0BBE.5FABA469@netmaking.com>
Hi,
I was wondering if it's possible to print to the MAIL header when
sending a MAIL through a Perl script. If it is, how do I access
the mail header? (I want to append a content-type and
mime-version line).
Best Regards,
Eirik Johansen
------------------------------
Date: Wed, 13 Sep 2000 05:25:46 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Perl script printing to MAIL header
Message-Id: <slrn8ru45n.12j.tjla@thislove.dyndns.org>
I was shocked! How could Eirik Johansen [netmaking.com] <eirik@netmaking.com>
say such a terrible thing:
>Hi,
>
>I was wondering if it's possible to print to the MAIL header when
>sending a MAIL through a Perl script. If it is, how do I access
>the mail header? (I want to append a content-type and
>mime-version line).
Well there are many ways of sending mail with Perl. How are you doing
it?
--
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
Being Ymor's right-hand man was like being gently flogged to death with
scented bootlaces.
-- Terry Pratchett, "The Colour of Magic"
------------------------------
Date: Wed, 13 Sep 2000 03:42:09 GMT
From: jtbell@presby.edu (Jon Bell)
Subject: Re: Perl vs. Java or C++
Message-Id: <G0t3MA.5nG@presby.edu>
In article <8pm3gv$clj$1@nnrp1.deja.com>, <rathmore@tierceron.com> wrote:
>I'm at an important decision in my career. I need to decide where to
>focus my learning as far as languages go.
Your first step should be to decide what system or application areas you
want to work in. Then, focus on the languages that are most useful in
those areas.
--
Jon Bell <jtbell@presby.edu> Presbyterian College
Dept. of Physics and Computer Science Clinton, South Carolina USA
[ Questions about newsgroups? Visit http://www.geocities.com/nnqweb/ ]
[ or ask in news:news.newusers.questions ]
------------------------------
Date: Tue, 12 Sep 2000 22:25:41 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Qualifications for new Perl programmer?????
Message-Id: <39BF0FD5.3A4A9325@stomp.stomp.tokyo>
David Steuber wrote:
> "Godzilla!" <godzilla@stomp.stomp.tokyo> writes:
> ' Clearly I am not hiring and, these are rhetorical musings.
> Fine, I don't mind a little sparing. I'll keep it friendly.
> As I said, I am not unwilling to rebuild a wheel from scratch. But I
> only do that when existing wheels don't fit.
(snipped)
Ahhh.. these are musings on qualifying for employment, not
personal practices in programming. Best test of a prospective
employee, for programming, is to have her, or him, write an
ingenious program of a type, from scratch. Concept is to test
programming skills, not an ability to copy and paste module
references and the such. This is no indicator of programming
skills but rather an indicator of talent with a mouse.
> As for rock'n'roll, that makes it an M-16, not an AR-15.
Full auto is illegal. However, there are drop in pocket
machine guns for a snap open AR-15, simple little device
which fits in a shirt pocket, no bigger than a small comb.
You just don't get tri-burst ability. It is not illegal
to own full auto mechanisms, such as a multiple selector,
a bolt catch release, and an M-16 style bolt. Illegal to
install them though.
Besides, one shot, one kill. This is why my first round,
and every other round in my Beretta are fragmenting Glazers.
Between, hollow points for punching holes through windshields,
wood doors and whatever else may impede my kill.
Godzilla!
--
print "http://3483852801/%7e%63%61ll%67i%72l";
------------------------------
Date: Wed, 13 Sep 2000 05:45:59 GMT
From: ranskaboss@my-deja.com
Subject: Simple newbie question
Message-Id: <8pn4ak$iit$1@nnrp1.deja.com>
Hi,
I would like to know how a good Perlprogrammer (yeah, I'm in a Perl
forum so, there must be some good programmer ;)
can do with regular expression to catch in string that :
ABCxxxxxxxxxxxxxxxxABCiiiiiiiii
ABCwwwwwwwwwwwww ABCfff
ABCdddddddddddddddd
I mean to recognize the first ABCxxxxxxxxxxx then the second ABCiiiiiii
then the third ABCwwwwwwww... ect
I already try something like \^ ABC\ but it's not that...
Thank you for your help.
Greg
ps: please, excuse my ignorance because I'm simply not a perl
programmer, but just a young humble javaprogrammer....
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 13 Sep 2000 17:18:57 +1100
From: jason <elephant@squirrelgroup.com>
Subject: Re: Simple newbie question
Message-Id: <MPG.1429b94aec6d777f9897a7@localhost>
ranskaboss@my-deja.com <ranskaboss@my-deja.com> wrote ..
>Hi,
>I would like to know how a good Perlprogrammer (yeah, I'm in a Perl
>forum so, there must be some good programmer ;)
>can do with regular expression to catch in string that :
>ABCxxxxxxxxxxxxxxxxABCiiiiiiiii
>ABCwwwwwwwwwwwww ABCfff
> ABCdddddddddddddddd
>
>I mean to recognize the first ABCxxxxxxxxxxx then the second ABCiiiiiii
>then the third ABCwwwwwwww... ect
>
>I already try something like \^ ABC\ but it's not that...
see the perlop documentation (you're looking for the m// operator) for
what's wrong with those slashes
the other problem you've got there is that the ^ character anchors the
regex to the beginning of the string (or line if the 'm' modifier is
used) .. and the space is significant
so your regex will only match if the first four characters of the string
are ' ', 'A', 'B' and 'C' .. which you clearly do not have
check out the documentation in perlre for more help on regular
expressions
for those documentation sections - at a command prompt type the
following
perldoc perlop
perldoc perlre
and for more information on the perldoc tool
perldoc perldoc
>ps: please, excuse my ignorance because I'm simply not a perl
>programmer, but just a young humble javaprogrammer....
good .. you should be used to comprehending documentation
--
jason -- elephant@squirrelgroup.com --
------------------------------
Date: Tue, 12 Sep 2000 22:42:16 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Where Doesn't this work?
Message-Id: <39BF13B8.3F7F1B12@stomp.stomp.tokyo>
"Allan M. Due" wrote:
> godzilla@stomp.stomp.tokyo says...
> |"Allan M. Due" wrote:
> |> In article <#x4Y0BRHAHA.278@cpmsnbbsa07>, Cheng3@email.msn.com says...
> Note:
> Quote level 1: = cheng3 # I am quoting his message and I used the |
> |> |Godzilla! <godzilla@stomp.stomp.tokyo> wrote in message
> Quote 2;= Godzilla # Cheng3 quoting you. He used the >
Yeah, ok, whatever. Let me know if you reach DEFCON 1 level.
My primary teachers taught us ducking and covering under a
desk will protect you from a ten million degree ten megaton
atomic, now hydrogen, bomb. If you hit DEFCON 1, I will duck
and cover under my desk to ensure survival.
Is it DEFCON 1 or DEFCON 4 ? I never can remember if our
military rates those forwards or backwards.
> |> |> $/ = "";
> |> |>
> |> |> open (FILEHANDLE, "test.txt");
> |> |> $string = <FILEHANDLE>;
> |> |doesn't this only get you the first line?
> |Don't see this article on Sucker News.
> Ok you don't see it; fine. But I am not quoting you, I am
> quoting Liang Cheng. Sucker news sucker you?
Sucker News has a failure rate averaging ten to twenty percent.
However, it is my default server, paid for, might as well use
it so Jon Jon the Constable won't blow smelly holes in his
shorts when I post from elsewhere.
I never would have realized you are quoting someone
else. Clearly I would have no recollection of what
I have said and, what I have not said. Thanks for
informing me, I did not make those comments.
> |No, reads entire file as a single line.
> |This is in clear evidence via my printed
> |results in my article.
> Which is what I said, ironically in support of your post.
A wise person will always support me. Not physically however.
This requires an industrial wheelbarrow or small fork lift.
> |Hmm... *scratches her noggin*
> |> Erm, see four lines above in your post.
> |No, actually I don't see those four lines.
> I don't know what to say about that. Visual accuity, not paying
> attention, jumping to a conclusion. I can't even guess. Of course
> they are four of chang3's lines so thay may have put you off your count.
Could be subtle sarcasm on my part.
> |> $/ = ""; may not be optimal
> |Why is this? Reads like Mere Assertion.
> See Jeff Pinyan's message in same thread.
What thread?
> |Without supporting evidence and explanation
> |your comments are dismissed as such,
> |unsubstantiated Mere Assertion.
> You go girl.
I'm a go-go girl.
> |> but it does negate your comment.
> |Negates what comment and why?
> That would be that Cheng saying your code wouldn't work. I said it
> would. You didn't pay attention.
Yeah ok. How dumb of me not to realize you are talking to
someone other than myself, although responding to my article.
> |> If you are going to do this with $/ then
> |> $string = do { local $/; <FILEHANDLE> };
> |> is cool
> |Why is this "cool"? Looks like obfuscation to me.
> cool cause $/ set to undef as it should and is localized. But, again
> cool is as cool does. My cool may be your hot. TIMTOWTDI
My hot surely is hot for you to handle.
Is there any difference in result outcome between
setting $/ to a null string and setting $/ to undef?
Isn't this like claiming unleaded gasoline is better
for your car than is no-lead gasoline?
> |This is not cool for reading comprehension.
> Clearly comprehension/cool is in the eye of the beholder
> in this case.
I'll say.
> You want me to do the searching for you? You post via Deja, you must
> know how to search with it.
I thought I post via Sucker News.
Godzilla!
--
print "http://3483852801/%7e%63%61ll%67i%72l";
------------------------------
Date: Wed, 13 Sep 2000 15:26:33 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Where Doesn't this work?
Message-Id: <bFEv5.20$0v1.3880@vic.nntp.telstra.net>
"Godzilla!" <godzilla@stomp.stomp.tokyo> wrote in message
news:39BF13B8.3F7F1B12@stomp.stomp.tokyo...
> Is there any difference in result outcome between
> setting $/ to a null string and setting $/ to undef?
Yes,
$/ as a null string will read to each occurrence of two or more "\n" in
a file. $/ as undef will read the whole file regardless of whether it
has repeated "\n" in it.
$/ as a null string is used to read things like radius log files in
"paragraph" mode (one paragraph to each 'line').
$/ as undef would read the entire file.
Wyzelli
------------------------------
Date: Tue, 12 Sep 2000 23:18:20 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Where Doesn't this work?
Message-Id: <39BF1C2C.26AAA318@stomp.stomp.tokyo>
Wyzelli wrote:
> Godzilla! wrote:
> > Is there any difference in result outcome between
> > setting $/ to a null string and setting $/ to undef?
> Yes,
> $/ as a null string will read to each occurrence of two or more "\n" in
> a file. $/ as undef will read the whole file regardless of whether it
> has repeated "\n" in it.
This is true. As a reward for being truthful, I shall
teach you a trick some seasoned programmers use to avoid
this issue of double new lines. This is a trick within
a trick. You cannot see this trick and will have to work
hard at learning the secret of this trick.
* smiles *
Godzilla!
--
print "http://3483852801/%7e%63%61ll%67i%72l";
TEST SCRIPT:
____________
#!/usr/local/bin/perl
print "Content-type: text/plain\n\n";
$/ = "";
open (FILEHANDLE, "test.txt");
$string = <FILEHANDLE>;
close (FILEHANDLE);
print "\nInput:\n\n$string";
$string =~ s/"//g;
print "\n\n\nOutput:\n\n$string";
exit;
PRINTED RESULTS:
________________
Input:
"Test Line One"
Test Line Two <A REF="myplace.com">My Place</A>
Test Line "Three" <FONT SIZE="4">
"Test" Line Four </FONT>
"Finished"
Output:
Test Line One
Test Line Two <A REF=myplace.com>My Place</A>
Test Line Three <FONT SIZE=4>
Test Line Four </FONT>
Finished
------------------------------
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 4308
**************************************