[19361] in Perl-Users-Digest
Perl-Users Digest, Issue: 1556 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Aug 18 06:05:40 2001
Date: Sat, 18 Aug 2001 03:05:10 -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: <998129110-v10-i1556@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sat, 18 Aug 2001 Volume: 10 Number: 1556
Today's topics:
Re: "shifting" values of the @_ array?? <pne-news-20010817@newton.digitalspace.net>
Re: Any ASCII graph plotting modules? (Chris Fedde)
Re: capitalisation/DBD/mysql <ilya@martynov.org>
Re: compare Net::FTP and LWP ? <iltzu@sci.invalid>
Re: Comparing data in two different files <iltzu@sci.invalid>
FAQ: Why does Perl let me delete read-only files? Why <faq@denver.pm.org>
HOWTO: perl script to Win9x application?? <jainraje@hotmail.com>
Intel and Randal, etc: WAS: Re: Poor man's HTML hidden (David Combs)
Re: IO::Socket::INET - Setting Reset bit when closing T (Martien Verbruggen)
Re: IO::Socket::INET - Setting Reset bit when closing T (Michael Fuhr)
Re: Learning Perl, 2nd Edition <iltzu@sci.invalid>
Re: local exec via cgi <jurgenex@hotmail.com>
Re: Local Perl via browser <jurgenex@hotmail.com>
Re: Local Perl via browser <wsegrave@mindspring.com>
Re: Local Perl via browser (Tad McClellan)
Re: Local Perl via browser <pne-news-20010818@newton.digitalspace.net>
Re: Local Perl via browser <Tassilo.Parseval@post.rwth-aachen.de>
Re: Newsletter Script <iltzu@sci.invalid>
Re: OT: Why is there so much white space in perl docume (Eric Bohlman)
Re: OT: Why is there so much white space in perl docume <miscellaneousemail@yahoo.com>
Re: Perl and E-mail function (Chris Fedde)
Re: Perl OO needs the opposite of SUPER:: <Tassilo.Parseval@post.rwth-aachen.de>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 18 Aug 2001 07:17:33 +0200
From: Philip Newton <pne-news-20010817@newton.digitalspace.net>
Subject: Re: "shifting" values of the @_ array??
Message-Id: <83tqntk3a2uk0tqbj6ugcvr8ql1ss4jq65@4ax.com>
On Fri, 17 Aug 2001 15:36:58 GMT, Carlos C. Gonzalez
<miscellaneousemail@yahoo.com> wrote:
> In article <74f348f7.0108170152.7d42e73c@posting.google.com>, Yves Orton
> at demerphq@hotmail.com says...
>
> > Yes. I wrote it in google, [snip]
>
> How do you write something in google (the search engine?).
You don't. You write something in google (the newsgroup archive with the
reading and posting interface).
Follow the URL in Yves's Organization: header for more information.
Cheers,
Philip
--
Philip Newton <nospam.newton@gmx.li>
That really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: Sat, 18 Aug 2001 04:24:55 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: Any ASCII graph plotting modules?
Message-Id: <r6mf7.224$V3.171110912@news.frii.net>
In article <Pine.OSF.4.10.10108171312100.4438-100000@dolphin.upenn.edu>,
Nico F Zigouras <zigouras@mail.med.upenn.edu> wrote:
>Are there any Perl modules out there that will plot a graph with ascii
>text. For example it will take two arrays for the X and Y data and output
>a bar graph in characters. Something like what you see for the graphs on
>web log analyzers that use little square gif images to build the bars -
>like Analog. I searched CPAN but could not find anything. Thanks in
>advance.
>
It's simple to do simple stuff.
#!/usr/bin/perl
#
$dim = 30;
$scale = 2*3.14159/$dim;
for $i (0..$dim) {
$x = $i*$scale;
$y = sin($x)+1;
printf "%4.2f %s*\n", $x, " "x(int($y*$dim));
}
For more complex stuff Gnuplot is a graphing system I've gotten
lots of mileage out of. Among other things it supports a "dumb"
ascii output.
gnuplot> set term dumb feed 75 24
Terminal type set to 'dumb'
Options are 'feed 75 24'
set xrange [0:2*pi]
gnuplot> plot sin(x)
1 ++---------+-*******-+----------+---------+----------+---------+-++
+ *** *** + + sin(x) ****** |
0.8 ++ *** ** ++
| ** * |
0.6 ++ * ** ++
| ** ** |
0.4 ++ ** * ++
| * ** |
0.2 ++* * ++
|* * |
0 *+ * +*
| * *|
-0.2 ++ * *++
| ** * |
-0.4 ++ * ** ++
| ** ** |
-0.6 ++ ** * ++
| * ** |
-0.8 ++ ** *** ++
+ + + + + *** *** + |
-1 ++---------+---------+----------+---------+----*******---------+-++
0 1 2 3 4 5 6
It's not too hard to write programs that drive this.
There is a driver for gnuplot in Chart::Graph but I've never used it.
Good luck
--
This space intentionally left blank
------------------------------
Date: 18 Aug 2001 10:54:49 +0400
From: Ilya Martynov <ilya@martynov.org>
Subject: Re: capitalisation/DBD/mysql
Message-Id: <87vgjlq2me.fsf@abra.ru>
MV> On 17 Aug 2001 14:39:45 +0400,
MV> Ilya Martynov <ilya@martynov.org> wrote:
>>
PF> DBI-> install_driver('mysql'); OR
PF> DBI-> connect(DBI:mysql:database=d;hostname=localhost);
>>
>> It should be
>>
DBI-> connect('dbi:mysql:database=d;hostname=localhost');
MV> [..skip..]
MV> Do you want to send them a bug report? :)
No. I think they will not accept my bug report if I will forget to
*quote* dsn string :)
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Ilya Martynov (http://martynov.org/) |
| GnuPG 1024D/323BDEE6 D7F7 561E 4C1D 8A15 8E80 E4AE BE1A 53EB 323B DEE6 |
| AGAVA Software Company (http://www.agava.com/) |
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
------------------------------
Date: 18 Aug 2001 05:44:14 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: compare Net::FTP and LWP ?
Message-Id: <998112994.19428@itz.pp.sci.fi>
In article <aYQc7.89368$EP6.21828923@news1.rdc2.pa.home.com>, Ben Kennedy wrote:
>
>As far as I know LWP uses Net::FTP to "do the dirty work", so I imagine
>there are no signifigant performance reasons to use one over the other. I'd
>say use LWP if you are working on an app that is using ftp:// style
>adddresses (saving you the working of parsing the username, password,
>navigation, etc) and use Net::FTP for anything that requires more than a
>simple download (anything interactive, uploading, etc). Hope this helps
Actuallty, you _can_ do FTP uploads with LWP -- just use the PUT method.
Otherwise, I pretty much agree.
--
Ilmari Karonen -- http://www.sci.fi/~iltzu/
"Get real! This is a discussion group, not a helpdesk. You post something,
we discuss its implications. If the discussion happens to answer a question
you've asked, that's incidental." -- nobull in comp.lang.perl.misc
------------------------------
Date: 18 Aug 2001 04:12:37 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Comparing data in two different files
Message-Id: <998107323.18162@itz.pp.sci.fi>
In article <3B72F100.886A95BC@acm.org>, John W. Krahn wrote:
>shaz wrote:
>>
>> How do I change the code below to remove all the words in the hash, which
>> are also present in the list.txt file?
>>
>> delete @words{qw(a is or of it the and)}; #stop list
>
>open LIST, 'list.txt' or die "Cannot open list.txt: $!";
>chomp( my @list = <LIST> );
>delete @words{@list};
..or, if there can be more than one word per line:
open LIST, 'list.txt' or die $!;
delete @words{+split} while <LIST>;
(The "while <>" loop is magical, but should be familiar to most Perl
programmers. The zero-argument split does just what is needed here,
which is to split $_ on whitespace. The + is there to stop perl from
thinking "split" is a hash key.)
--
Ilmari Karonen -- http://www.sci.fi/~iltzu/
"Get real! This is a discussion group, not a helpdesk. You post something,
we discuss its implications. If the discussion happens to answer a question
you've asked, that's incidental." -- nobull in comp.lang.perl.misc
------------------------------
Date: Sat, 18 Aug 2001 06:17:01 GMT
From: PerlFAQ Server <faq@denver.pm.org>
Subject: FAQ: Why does Perl let me delete read-only files? Why does "-i" clobber protected files? Isn't this a bug in Perl?
Message-Id: <xLnf7.225$V3.189820416@news.frii.net>
This message is one of several periodic postings to comp.lang.perl.misc
intended to make it easier for perl programmers to find answers to
common questions. The core of this message represents an excerpt
from the documentation provided with every Standard Distribution of
Perl.
+
Why does Perl let me delete read-only files? Why does "-i" clobber protected files? Isn't this a bug in Perl?
This is elaborately and painstakingly described in the "Far More Than
You Ever Wanted To Know" in
http://www.perl.com/CPAN/doc/FMTEYEWTK/file-dir-perms .
The executive summary: learn how your filesystem works. The permissions
on a file say what can happen to the data in that file. The permissions
on a directory say what can happen to the list of files in that
directory. If you delete a file, you're removing its name from the
directory (so the operation depends on the permissions of the directory,
not of the file). If you try to write to the file, the permissions of
the file govern whether you're allowed to.
-
Documents such as this have been called "Answers to Frequently
Asked Questions" or FAQ for short. They represent an important
part of the Usenet tradition. They serve to reduce the volume of
redundant traffic on a news group by providing quality answers to
questions that keep coming up.
If you are some how irritated by seeing these postings you are free
to ignore them or add the sender to your killfile. If you find
errors or other problems with these postings please send corrections
or comments to the posting email address or to the maintainers as
directed in the perlfaq manual page.
Answers to questions about LOTS of stuff, mostly not related to
Perl, can be found by pointing your news client to
news:news.answers
or to the many thousands of other useful Usenet news groups.
Note that the FAQ text posted by this server may have been modified
from that distributed in the stable Perl release. It may have been
edited to reflect the additions, changes and corrections provided
by respondents, reviewers, and critics to previous postings of
these FAQ. Complete text of these FAQ are available on request.
The perlfaq manual page contains the following copyright notice.
AUTHOR AND COPYRIGHT
Copyright (c) 1997-1999 Tom Christiansen and Nathan
Torkington. All rights reserved.
This posting is provided in the hope that it will be useful but
does not represent a commitment or contract of any kind on the part
of the contributers, authors or their agents.
05.33
--
This space intentionally left blank
------------------------------
Date: Sat, 18 Aug 2001 06:20:27 GMT
From: "Rajeev Jain" <jainraje@hotmail.com>
Subject: HOWTO: perl script to Win9x application??
Message-Id: <LOnf7.1424$Qh2.241739@typhoon.san.rr.com>
I've developed a perl application for post-processing a large text file.
I need to: 1) add a GUI to it (for obvious reasons) and 2) distribute the
application as a Win9x/NT executable since target users will not have perl
or Tk installed on their systems.
Thoughts and comments on how best to meet the above requirements
would be greatly appreciated?
Thanks in advance for your feedback,
-Rajeev
------------------------------
Date: 18 Aug 2001 07:39:19 GMT
From: dkcombs@panix.com (David Combs)
Subject: Intel and Randal, etc: WAS: Re: Poor man's HTML hidden field message digest??
Message-Id: <9ll637$fvi$1@news.panix.com>
In article <MPG.15ddef01a8f82cff989727@news.edmonton.telusplanet.net>,
Carlos C. Gonzalez <miscellaneousemail@yahoo.com> wrote:
>...
>Nice clean web site. I like that. Will keep you and your company in
>mind Tad though the price is a bit steep for me at this time =:).
>
>Too bad about Randall's legal hassles with Intel. Doesn't sit too well
>with me when a company like Intel deals with people in a bullying way
Looks like you can add Adobe to Intel, these days.
And a couple of years, up in your Canada, some farmer was
using some of Monsanto's (patented) genetically-modified
seeds on his land.
Somehow, some pollen from the plants got into the
crop on some OTHER farmer's land (nearby) -- via
wind, birds, bees, who knows how.
Anyway, Monsanto had hired some detective firm to sneak
around grabbing samples from these nearby farms,
and shipping them to some lab that would test the
genetics.
Discovered some Monsanto genes in this other farmer's
crops.
Monsanto DEMANDED that this guy PAY Monsanto for
for the seed or whatever that he had "STOLEN".
And they viciously PURSUED this thing, maybe even
into the courts, until they realized it was becoming
a PR disaster for them, and withdrew.
Nifty keen, these patents, no?
David
.
------------------------------
Date: Sat, 18 Aug 2001 12:12:44 +1000
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: IO::Socket::INET - Setting Reset bit when closing TCP connection?
Message-Id: <slrn9nrjos.3ga.mgjv@martien.heliotrope.home>
On Sat, 18 Aug 2001 00:57:48 GMT,
Ben Kennedy <bkennedy99@Home.com> wrote:
>
> "Jay McGavren" <sgarfunkle@hotmail.com> wrote in message
> news:6bb557e1.0108171020.38c5016f@posting.google.com...
>
>> How can I specify that I want the 'Fin' bit off and the Reset bit on,
>> hopefully while still using IO::Socket::INET? Many thanks for any
>> help you can give!
>
> Unless you want to reimplement a TCP stack with raw sockets, you can't munge
> packets like this in Perl - perhaps you just need to use the shutdown()
> command on the socket?
Maybe the NetPacket::TCP module could help here.
Martien
--
Martien Verbruggen |
Interactive Media Division | Never hire a poor lawyer. Never buy
Commercial Dynamics Pty. Ltd. | from a rich salesperson.
NSW, Australia |
------------------------------
Date: 17 Aug 2001 22:07:14 -0600
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: IO::Socket::INET - Setting Reset bit when closing TCP connection?
Message-Id: <9lkpli$872@flatland.dimensional.com>
mgjv@tradingpost.com.au (Martien Verbruggen) writes:
> On Sat, 18 Aug 2001 00:57:48 GMT,
> Ben Kennedy <bkennedy99@Home.com> wrote:
> >
> > "Jay McGavren" <sgarfunkle@hotmail.com> wrote in message
> > news:6bb557e1.0108171020.38c5016f@posting.google.com...
> >
> >> How can I specify that I want the 'Fin' bit off and the Reset bit on,
> >> hopefully while still using IO::Socket::INET? Many thanks for any
> >> help you can give!
> >
> > Unless you want to reimplement a TCP stack with raw sockets, you can't munge
> > packets like this in Perl - perhaps you just need to use the shutdown()
> > command on the socket?
Calling shutdown(SHUT_WR) or shutdown(SHUT_RDWR) should send a FIN,
which is the proper way to close a TCP connection but isn't the desired
behavior in this case.
> Maybe the NetPacket::TCP module could help here.
You might be able to use the SO_LINGER socket option to send RST instead
of FIN when you close the socket. The following example works for me:
my $linger = pack("ii", 1, 0);
$sock->sockopt(SO_LINGER, $linger) or die "sockopt: $!\n";
$sock->close;
In C, the argument used with SO_LINGER is a struct linger:
struct linger {
int l_onoff;
int l_linger;
};
The pack() function in the Perl code above is creating the equivalent
of this:
struct linger linger;
linger.l_onoff = 1;
linger.l_linger = 0;
These values should cause RST to be sent when the socket closes. For
more information, see the manual page for setsockopt() or _UNIX Network
Programming_, Volume 1, pp. 187-191 (by W. Richard Stevens).
Hope this helps.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
------------------------------
Date: 18 Aug 2001 06:25:04 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Learning Perl, 2nd Edition
Message-Id: <998114860.19928@itz.pp.sci.fi>
In article <3B76C163.CE27DE12@stomp.stomp.tokyo>, Godzilla! wrote:
>
>A note of humor for you, Randal.
>
>When Perl 5 is no longer supported, I am certain these geeks
>will say, as they do about Perl 4,
>
> "Perl 5 is a Flea Bitten Dead Camel Carcass and anyone
> who uses Perl 5 is a total idiot."
Oh, they certainly will. Unsupported software, like fish out of the
water, by its nature soon begins to stink. Any perl before 5.004 is
already well past its sell-by date, and even that release is starting to
feel a bit stale by now.
In any case, Perl 5 has accumulated a whole number of misfeatures over
the years. Many of those are for compatibility with earlier Perl 5
releases, which had many of them for Perl 4 compatibility, which in turn
had many of them for compatibility with Perl 3, and so on.
As soon as we can drop all that baggage, I say good riddance.
(That is, after all, as good a definition of "idiot" as any: If you have
no hammer, driving nails with a big rock is a clever solution. If you
do have a hammer available, it's just stupid.)
--
Ilmari Karonen -- http://www.sci.fi/~iltzu/
"Get real! This is a discussion group, not a helpdesk. You post something,
we discuss its implications. If the discussion happens to answer a question
you've asked, that's incidental." -- nobull in comp.lang.perl.misc
------------------------------
Date: Fri, 17 Aug 2001 18:27:51 -0700
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: local exec via cgi
Message-Id: <3b7dc498@news.microsoft.com>
"David Efflandt" <see-sig@from.invalid> wrote in message
news:slrn9nrb0g.38i.see-sig@typhoon.xnet.com...
> On Fri, 17 Aug 2001 09:31:27 -0700, Jürgen Exner <jurgenex@hotmail.com>
wrote:
> > "GunneR" <ds@ss.com> wrote in message
> > news:129rntscc67ecs5cm8hehf82cpet5618fi@4ax.com...
> >> I know this is very insecure, and im not sure if its even perl
> >> related, but...
> > No, your are right: this has nothing to do with Perl
> >
> >> Im trying to write a cgi script that executes local code (via system,
> >> exec, etc) on the system that visits the page.
> >
> > Let me get this straight:
> > - The Perl script is running as a CGI program on the web server
> > - You want this script to start/run some program on the client
> >
> > Luckily this is not possible! It would be a security hole as large as
> > Alaska.
> > Just imagine you are visiting my web site and my CGI script would run a
> > "format" on your computer....
>
> Huh, what kind of systems have you been on. Perl CGI can run external
> commands, scripts or programs just like any other Perl script can,
> provided the user that CGI is running as has permission to do that. A
> normal user would (hopefully) not have permission to format a drive.
You missed the point.
The OP was asking for the Perl CGI script to run a command on the CLIENT(!)
(not the server as you assumed).
jue
------------------------------
Date: Fri, 17 Aug 2001 18:31:38 -0700
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Local Perl via browser
Message-Id: <3b7dc57b$1@news.microsoft.com>
"Shah Kashani" <skashani@uk.ibm.com> wrote in message
news:9liuko$nfi$1@sp15at20.hursley.ibm.com...
> Just a rather stupid question; is it possible to run perl files locally in
a
> browser?
No, that is not possible (unless you install PerlScript but that's not what
you are asking for).
But why in a browser? You can just run them from the command line.
> I write quite a lot of Perl stuff for the web, and every time I
> want to test them, I have to keep uploading them. Don't wanna do that. Any
> ideas?
Ahhh, are you talking about CGI programming by any chance?
Then just install a local web server. I think that is even mentioned in the
FAQ.
jue
------------------------------
Date: Fri, 17 Aug 2001 18:42:20 -0500
From: "William Alexander Segraves" <wsegrave@mindspring.com>
Subject: Re: Local Perl via browser
Message-Id: <9lklvf$1aa$1@slb3.atl.mindspring.net>
"Shah Kashani" <skashani@uk.ibm.com> wrote in message
news:9liuko$nfi$1@sp15at20.hursley.ibm.com...
> Hi guys,
> Just a rather stupid question; is it possible to run perl files locally in
a
> browser? I write quite a lot of Perl stuff for the web, and every time I
> want to test them, I have to keep uploading them. Don't wanna do that. Any
> ideas?
>
> Cheers,
> Shah
>
>
Witn MSWindows, TinyWeb (server) works well with localhost. YMMV.
Bill Segraves
Auburn, AL
>
>
------------------------------
Date: Fri, 17 Aug 2001 23:40:18 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Local Perl via browser
Message-Id: <slrn9nrot2.d1m.tadmc@tadmc26.august.net>
Shah Kashani <skashani@uk.ibm.com> wrote:
>Just a rather stupid question; is it possible to run perl files locally in a
>browser?
It is never possible to run Perl programs in a (major) browser.
The browser is just an input/output device. The Perl program
runs on the server, not the client (browser).
>I write quite a lot of Perl stuff for the web, and every time I
>want to test them, I have to keep uploading them. Don't wanna do that. Any
>ideas?
First, just install Perl and debug from the command line locally
(this is easy if you are using CGI.pm).
Then install your own free web server, such as Apache, so you
can try them under the CGI environment.
Now you can do most of your development with no network
connection whatsoever.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 18 Aug 2001 09:23:41 +0200
From: Philip Newton <pne-news-20010818@newton.digitalspace.net>
Subject: Re: Local Perl via browser
Message-Id: <1b1snto3ul0afkmq15onp0t3ik39jdfmrc@4ax.com>
On Fri, 17 Aug 2001 23:40:18 -0400, tadmc@augustmail.com (Tad McClellan)
wrote:
> It is never possible to run Perl programs in a (major) browser.
Then you probably missed the thread here about "Self-Searchable Perl
Documentation" that started about three weeks ago. It used PerlScript
inside MSIE, IIRC. Those scripts do not, of course, use the CGI, but
they were "Perl programs running in a (major) browser".
Cheers,
Philip
--
Philip Newton <nospam.newton@gmx.li>
That really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: Sat, 18 Aug 2001 09:34:03 +0200
From: Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: Local Perl via browser
Message-Id: <3B7E1A6B.2020107@post.rwth-aachen.de>
Philip Newton wrote:
> On Fri, 17 Aug 2001 23:40:18 -0400, tadmc@augustmail.com (Tad McClellan)
> wrote:
>
>
>>It is never possible to run Perl programs in a (major) browser.
>>
>
> Then you probably missed the thread here about "Self-Searchable Perl
> Documentation" that started about three weeks ago. It used PerlScript
> inside MSIE, IIRC. Those scripts do not, of course, use the CGI, but
> they were "Perl programs running in a (major) browser".
But you are also missing something. :-)
The OP asked about running applications written for the web locally.
PerlScript works on top of ActiveX and thus it is not portable.
Actually, PerlScript is an approach to client-side scripting whereas the
opriginal post was very likely about CGI, that is: server-side scripting.
And in this concern, Tad was totally right: It is never possible to run
programs in a (major) browser.
Tassilo
--
$a=[(74,116)];$b=[($a->[1]-1,$a->[1]++,0x20)];$c=[(97,110)];$d=[($c->
[1]+1,$b->[1],"her")];for(@{[$a,$b,$c,$d]}){for(@{$_}){$_=~/\d+/?print
(chr($_)):print;}}$c=sub{$l=shift;[(0x20+$l-1,0x50,0x65,0x73-0x01,108
),(0x20,0x68,0x61,)]};print(map{chr($_)}@{($c->(1))});$h={a=>33*3,b=>
10**2+7,c=>"1"."0"."1",d=>0162};@h=sort(keys(%$h));for(@h){print(chr(
ord(chr($h->{$_}))))};
------------------------------
Date: 18 Aug 2001 06:01:29 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Newsletter Script
Message-Id: <998114304.19756@itz.pp.sci.fi>
In article <9l0b2l$im3$1@reader1.imaginet.fr>, Sgluarb wrote:
>
>Somebody have a newsletter script to send mail ( with text and HTML) ?
>
>PS1: Our NewsLetter email list is about 10 000 persons
>PS2: ActivePerl 5.6
If you want to send bulk e-mail with Perl, you could do worse than use
the Mail::Bulkmail module that has been optimized for it.
http://search.cpan.org/search?dist=Mail-Bulkmail
--
Ilmari Karonen -- http://www.sci.fi/~iltzu/
"Get real! This is a discussion group, not a helpdesk. You post something,
we discuss its implications. If the discussion happens to answer a question
you've asked, that's incidental." -- nobull in comp.lang.perl.misc
------------------------------
Date: 18 Aug 2001 04:19:19 GMT
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: Re: OT: Why is there so much white space in perl documentation??
Message-Id: <9lkqc7$eqp$1@bob.news.rcn.net>
Carlos C. Gonzalez <miscellaneousemail@yahoo.com> wrote:
> I don't know how many times I have encountered stumbling blocks and other
> things that aren't covered in most books I see. A lot of books (though
> Learning Perl certainly is not one) seem to be written by technical
> writers instead of programmers.
> I am learning a great deal as I overcome these frustations (with the help
> of everyone on CLPM of course). It is these things that I may end up
> writing about. We will see....
> If there was a book that could have taught me what I am learning as I go
> and if I had known about it I would have considered paying $100.00+ US a
> worthwhile investment to get it.
There are really two main reasons why you've been encountering so many
stumbling blocks:
1) You've been trying to teach yourself programming *and* Perl *and*
certain aspects of Web administration *and* general command-line
proficiency *all at the same time*. That's quite a tall order; even
trying to learn it in a class rather than autodidactically would be
difficult for most people. You're doing much better at it than most
people would.
2) You seem to have a burning desire to deeply understand ("grok")
everything you're learning, rather than trying to memorize magic
incantations that you don't understand and BSing your way through
unfamiliar stuff. Learning that way takes longer and is more frustrating
at the beginning, but as you can imagine, it will really pay off down the
road. If I may make an analogy, you're trying to build a house and it
doesn't look very substantial yet because all your work has been going
into the foundation; someone who just slapped a few boards on the ground
and started building on that would have a much more impressive-looking
result by now than you do. But guess what will happen when the next big
storm hits...
------------------------------
Date: Sat, 18 Aug 2001 05:07:08 GMT
From: Carlos C. Gonzalez <miscellaneousemail@yahoo.com>
Subject: Re: OT: Why is there so much white space in perl documentation??
Message-Id: <MPG.15e7a59d5b46160b98977e@news.edmonton.telusplanet.net>
Eric Bohlman at ebohlman@omsdev.com said...
> There are really two main reasons why you've been encountering so many
> stumbling blocks:
>
> 1) You've been trying to teach yourself programming *and* Perl *and*
> certain aspects of Web administration *and* general command-line
> proficiency *all at the same time*.
Add CSS, SQL, password protection using htaccess or other schemes,
firewall set up and administration, internet marketing, some Javascript,
basic Unix, telnet, web site CGI security, CGI for that matter, and a
number of other things. Come to think of it I guess I have taken on a
lot. I really have no choice. I want to succeed on the Internet and
make my living off of it. And I can't afford a top notch programmer to
do it for me. Even if I could I don't think I would. Learning to do a
lot of this myself has it's long term dividends as you say.
I do have a programming background but compared to what I am doing now it
was a walk in the park (except for Delphi object oriented programming
which knocked the breath out of me for a while before I caught on to it -
it was my first exposure to object oriented anything).
> You're doing much better at it than most
> people would.
With encouragement like that one could go very far indeed.
> 2) You seem to have a burning desire to deeply understand ("grok")
> everything you're learning, rather than trying to memorize magic
> incantations that you don't understand and BSing your way through
> unfamiliar stuff.
I definitely want to understand everything I am learning. You're right
about that Eric. Sometimes I try to delve too deeply into things when I
should be letting go and accomplishing more with what I already know.
Thanks again for your encouraging words Eric. Good to hear some once in
a while.
---
Carlos
www.internetsuccess.ca
*NOTE*: Internet Success is NOT yet fully operational so please don't
subscribe. Thanks.
------------------------------
Date: Sat, 18 Aug 2001 03:26:43 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: Perl and E-mail function
Message-Id: <Tflf7.223$V3.171041792@news.frii.net>
In article <3B7D652D.AF28EDF1@cemnetwork.com>,
John Burris <john@cemnetwork.com> wrote:
>I am a webmaster that has a problem. My boss wants a list server, but
>the ISP we use does not allow them. We could switch ISP, but that is
>not an option. My question is does anybody know of an e-mail/perl
>totorial for me to read so I can write a perl program that will function
>much like a list server. I need to know what modules are availabe and
>if any good documentation is out there for the modules.
>
>Thanks in advance
>
>John Burris
>webmaster
>john@cemnetwork.com
>
One place to start is to look at www.cpan.org and read the module list.
There are lots of tools there to help with generating mail. Another
solution is to contract with a second ISP for just the mail functions that
you need.
good luck
--
This space intentionally left blank
------------------------------
Date: Sat, 18 Aug 2001 09:02:52 +0200
From: Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: Perl OO needs the opposite of SUPER::
Message-Id: <3B7E131C.2030104@post.rwth-aachen.de>
Martien Verbruggen wrote:
> On Thu, 16 Aug 2001 10:43:57 +0200,
> Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de> wrote:
>
>> Base-classes are most often abstract so you
>>can't sensibly instantiate one.
>>
>
> I don't think this is true, and my problem is with the word 'most' in
> the above sentence. Base classes may often be abstract (or for Perl,
> meant to be abstract), but they certainly are not in most cases. Any
> time you need to have a class that behaves differently from one that you
> already have, you can subclass it, and override one or more of its
> methods. The original class can be a fully functional class, and very
> often is.
Ah, well. I sounded too strict, agreed. You have mentioned an indeed
quite common scneario as well whereas I was referring to something like:
package Foo::Bar::Base;
sub new {
my ($class, @args) = shift;
if ($class eq __PACKAGE__) { # <- direct instantiation
use Carp;
my $package = __PACKAGE__;
croak <<USAGE;
$package should not really be created diretly.
Instead, instantiate one of its derived subclasses.
USAGE
}
my $self = bless {}, $class;
$self->init(\@args};
}
This can be found quite often in Perl-modules.
But I agree that things look different when a class extends another one,
that is, you put something in @ISA like MIME::Entity that is often a
backend for those mail-modules.
Therefore I think it is a common thing to create a baseclass that is
meant to be abstract and some other base-classes that are not:
package Foo::Bar;
@ISA = qw(Foo::Bar::Base MIME::Entity);
__END__
package Main;
my $obj = Foo::Bar->new;
$obj->effective_type; # from MIME::Entitiy for instance
Tassilo
--
$a=[(74,116)];$b=[($a->[1]-1,$a->[1]++,0x20)];$c=[(97,110)];$d=[($c->
[1]+1,$b->[1],"her")];for(@{[$a,$b,$c,$d]}){for(@{$_}){$_=~/\d+/?print
(chr($_)):print;}}$c=sub{$l=shift;[(0x20+$l-1,0x50,0x65,0x73-0x01,108
),(0x20,0x68,0x61,)]};print(map{chr($_)}@{($c->(1))});$h={a=>33*3,b=>
10**2+7,c=>"1"."0"."1",d=>0162};@h=sort(keys(%$h));for(@h){print(chr(
ord(chr($h->{$_}))))};
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 1556
***************************************