[11943] in Perl-Users-Digest
Perl-Users Digest, Issue: 5543 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun May 2 14:07:12 1999
Date: Sun, 2 May 99 11:00:17 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 2 May 1999 Volume: 8 Number: 5543
Today's topics:
An attempt to compare the performance of perl vs compil <elliotsl@NOSPAMmindspring.com>
Re: extracting text (Tad McClellan)
Re: Help: Regex Parser Testing? <scott@waddells.net>
I need some socket help! esalmon@packet.net
is o'reilly auctioning off llama books? <uri@sysarch.com>
Re: is o'reilly auctioning off llama books? (Ronald J Kimball)
Re: Job Offer (Bbirthisel)
perl and C <akshat@cs.utexas.edu>
Perl error: wat is dit? <rusenet@bigfoot.com>
Re: Perl error: wat is dit? <tchrist@mox.perl.com>
Re: Perl error: wat is dit? (Larry Rosler)
Re: Possible to modify gif/jpeg images with Perl?? (Randal L. Schwartz)
Re: Question : Maybe I missed something about arrays, h <iggepop@my-dejanews.com>
Re: RegExp for escape characters swistow@my-dejanews.com
Re: Sorting numbers <mhc@Eng.Sun.COM>
Re: Throw a person a fish... <uri@sysarch.com>
Re: Unix files in MacPerl <jason.holland@dial.pipex.com>
Re: unos problemitas (Stefaan A Eeckels)
Re: using perl to manage passwords? (Tad McClellan)
Re: Where is HeaderParser.pm? <huymle@gis.net>
Re: Who is Just another Perl hacker? (Randal L. Schwartz)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 02 May 1999 12:46:34 -0400
From: Steven Elliott <elliotsl@NOSPAMmindspring.com>
Subject: An attempt to compare the performance of perl vs compiled perl vs C
Message-Id: <372C816A.D165ED27@NOSPAMmindspring.com>
This is a multi-part message in MIME format.
--------------CD242F0D2A3CD569224ED75C
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Recently I became curious as to how much of a performance gain I could
could get by compiling a perl script to bytecode, an executable, and, as
a last resort, translating the perl script to C and then compiling it
to an executable. Please look at the following attached files:
sum_array.pl
sum_array.c
sum_array.stats # Results of invoking the above to files in various
# ways.
Thes tests were run on a 200 MHz i586 Linux machine with with 64 Mb
of ram.
The program I chose (sum_array.{pl,c}) is small, mathematically
intensive and makes many array accesses. This I believe, and as I
think my test results demonstrate, strongly favors C. My intent in
choosing an example that strongly favors C was not to be deprecate perl
but to determine what the worst case scenario might be in terms of my
having to rewrite something into C. I love perl.
Here is what I believe to be the relative merits each approach:
o perl uncompiled (sum_array.pl)
- Reliable
- Platform independent
- Easy to maintain
o perl compiled to bytecode (from sum_array.pl)
- Obscusified
- Platform independent
o perl compiled to an executable (from sum_array.pl)
- Obscusified
- Faster
o C compiled to an executable (from sum_array.c)
- Obscusified
- Fastest
Does this seem like a valid test? Has anyone else done a
similar comparison?
--
To reply to me remove "NOSPAM" from my e-mail address.
--------------CD242F0D2A3CD569224ED75C
Content-Type: application/x-perl; name="sum_array.pl"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="sum_array.pl"
#!/usr/bin/perl -w
# A small benchmark program with emphasis on iterating though an array
# while performing floating point calculations on it's entries.
use strict;
my $index;
my $count;
my $iterations = $ARGV[0] || 100000;
my @tst_array;
my $sum;
for($index = 0; $index < 100; $index++)
{
$tst_array[$index] = ($index + 1.0)/10.0;
}
for($count = 1; $count <= $iterations; $count++)
{
for($index = 0; $index < 100; $index++)
{
$sum += $tst_array[$index];
$sum -= 100.0 if($sum > 100.0);
}
}
print "The sum is $sum\n";
--------------CD242F0D2A3CD569224ED75C
Content-Type: text/plain; charset=us-ascii; name="sum_array.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="sum_array.c"
/* A small benchmark program with emphasis on iterating though an array */
/* while performing floating point calculations on it's entries. */
static int index;
static int count;
static int iterations = 100000;
static double tst_array[100];
static double sum = 0;
main(int argc, char *argv[])
{
if(argc == 2)
{
iterations = atoi(argv[1]);
}
for(index = 0; index < 100; index++)
{
tst_array[index] = (index + 1.0)/10.0;
}
for(count = 1; count <= iterations; count++)
{
for(index = 0; index < 100; index++)
{
sum += tst_array[index];
if(sum > 100.0)
sum -= 100.0;
}
}
printf("The sum is %1.15g\n", sum);
return 0;
}
--------------CD242F0D2A3CD569224ED75C
Content-Type: text/plain; charset=us-ascii; name="sum_array.stats"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="sum_array.stats"
# perl uncompiled (sum_array.pl) -> 58 sec:
~/pl>date ; ./sum_array.pl ; date
Sun May 2 10:39:39 CDT 1999
The sum is 1.4210854715202e-10
Sun May 2 10:40:37 CDT 1999
# perl compiled to bytecode (from sum_array.pl) -> 58 sec:
~/pl>date ; pl_byteperl sum_array.plc ; date
Sun May 2 10:38:00 CDT 1999
The sum is 1.4210854715202e-10
Segmentation fault (core dumped)
Sun May 2 10:38:58 CDT 1999
# perl compiled to an executable (from sum_array.pl) -> 22 sec:
~/pl>date ; ./sum_array ; date
Sun May 2 10:42:51 CDT 1999
The sum is 1.4210854715202e-10
Sun May 2 10:43:13 CDT 1999
# C compiled to an executable (from sum_array.c) -> 2 sec:
~/pl>date ; ./sum_array_c ; date
Sun May 2 11:44:45 CDT 1999
The sum is 1.4210854715202e-10
Sun May 2 11:44:47 CDT 1999
--------------CD242F0D2A3CD569224ED75C--
------------------------------
Date: Sun, 2 May 1999 06:13:57 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: extracting text
Message-Id: <5h8hg7.ns.ln@magna.metronet.com>
gertyk@mail.cybernexADD.net wrote:
: To remove all the tags on the line use this:
my $s = 'before tag<img src="img.jpg" alt=" >Image< ">after tag';
: $s=~s/<[^>]*>//g;
: print $s;
??
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 02 May 1999 16:03:14 GMT
From: Scott Waddell <scott@waddells.net>
Subject: Re: Help: Regex Parser Testing?
Message-Id: <372C7726.4FDDC742@waddells.net>
Thanks!
"M.J.T. Guy" wrote:
> Scott Waddell <scott@waddells.net> wrote:
> >I'm looking for a way to automate testing whether or not a particular
> >regular expression parser is working properly.
> >
> >Can anyone point me to any tools or input/output sequences for testing
> >third party regex engines?
>
> The obvious resource is the regression tests that come with Perl.
> See t/op/regexp.t and t/op/regexp_noamp.t in the Perl source
> tree.
>
> Also I believe that Philip Hazel has an extensive set of tests he uses
> to exercise his pcre package. Some of them even broke Perl5. See
>
> ftp://ftp.cus.cam.ac.uk/pub/software/programs/pcre/
>
> Mike Guy
------------------------------
Date: Sun, 02 May 1999 13:37:01 -0400
From: esalmon@packet.net
Subject: I need some socket help!
Message-Id: <372C8D3D.1C7E@packet.net>
I am playing around with learning the inner workings of UNIX sockets,
with Perl, and have had some luck here and there. I have been able to do
some edits to adapt and reverse engineer a http-get request script
successfully and would like to see it readapted for FTP. I know it is
easier to just use Net::FTP but I like to hack and learn.
I am on a UNIX BSDI BSD/OS 3.1 running the Apache HTTPD Server v1.2.6
and mainly programming in Perl v5.x.
Following is a Perl script that I have re-written and tested
successfully for Perl 5.x. I would like to see this readapted for FTP
with both anonymous and username/password logon abilities. Mainly I need
to see how this script would look if it were FTP instead of HTTP-Get. If
anyone could help and submit an example that I can hack I would
appreciate it. Please respond to both this News message and my email
at:contact@info-wiz.com
Please keep it simple for I only need to see the fundamentals not some
automated do-everything script.
Thanks in advance
Eric R. Salmon
#!/usr/local/bin/perl
print "Content-type:text/html\n\n";
#==============================================================================================================
#
# ############################################ INITIALIZATION
########################################### #
#==============================================================================================================
#
$server = "www.isp.psi.net"; $port = 80;
$document = "/nops-eng/matrix/";
@Headers = ("User-Agent", "http-get/0.1");
#==============================================================================================================
#
# ############################################ BODY ( BEGIN )
########################################### #
#==============================================================================================================
#
&main;
#==============================================================================================================
#
# #################################### INTERNAL SUBROUTINES ( BEGIN
) ################################### #
#==============================================================================================================
#
sub TCP { join("", getprotobyname('tcp')); }
sub SOCK_STREAM { 1; }
sub AF_INET { 2; }
sub PF_INET { &AF_INET; }
sub main {
if ($server =~ /^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/) { @addrs =
pack('C4', split(/\./,$server));
} else { ($dummy,$dummy,$dummy,$dummy, @addrs) =
gethostbyname($server); }
$remote = pack("S n a4 x8", &AF_INET, $port, $addrs[0]);
socket(S, &PF_INET, &SOCK_STREAM, &TCP) || die "socket: $!";
connect(S, $remote) || die "connect: $!";
select(S); $| = 1;
select(STDOUT); $| = 1;
$request = "GET $document HTTP/1.0\r\n";
while ($#Headers > 0) { $request = $request . "$Headers[0]:
$Headers[1]\r\n"; shift(@Headers); shift(@Headers); }
$request = $request . "\r\n";
print S "$request";
open(OpenFile,">/usr/local/tmp.txt");
$big = 1024*1024;
while ($len = sysread(S, $data, $big)) { $out = syswrite(LoadFile,
$data, $len); }
close(LoadFile);
close(S) || die "close: $!";
}
#################################################################################################################
------------------------------
Date: 02 May 1999 13:08:24 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: is o'reilly auctioning off llama books?
Message-Id: <x7k8ur4cxj.fsf_-_@home.sysarch.com>
this article intrigued me. it says "llamas start at $500"!! what could
make them charge so much? special editions? autographed by every major
perl hacker? special deodorants? a personal tuturial session with randal?
http://www.boston.com/dailyglobe2/121/living/How_many_llamas_fit_on_the_auction_block_+.shtml
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Sun, 2 May 1999 13:23:08 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: is o'reilly auctioning off llama books?
Message-Id: <1dr6iba.1b8smjkqjozb8N@p49.block2.tc4.state.ma.tiac.com>
Uri Guttman <uri@sysarch.com> wrote:
> this article intrigued me. it says "llamas start at $500"!! what could
> make them charge so much? special editions? autographed by every major
> perl hacker? special deodorants? a personal tuturial session with randal?
>
Actually, I think each copy of the book comes with a _real_ llama!!
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: 2 May 1999 17:46:22 GMT
From: bbirthisel@aol.com (Bbirthisel)
Subject: Re: Job Offer
Message-Id: <19990502134622.24980.00001209@ng-fq1.aol.com>
Hi Tony:
>I have a small Web Design company which recently won a huge
>new client and we can't really cope !
>apologies if this is very off topic.
Well, it IS off topic. But you might want to look at the "Job Board"
at The Perl Journal site (http://tpj.com). People there have agreed
to be contacted for activities like this. We also provide details
about our experience and interests to make it easier for you to
find the people you need.
-bill
Making computers work in Manufacturing for over 25 years (inquiries welcome)
------------------------------
Date: Sun, 02 May 1999 12:12:58 -0500
From: Akshat Bhargava <akshat@cs.utexas.edu>
Subject: perl and C
Message-Id: <372C879A.9E3D35B7@cs.utexas.edu>
I have a perl script running as a "wwwuser". I need that script to
communicate
with a script in C. Basically, I have to pass an array from my perl
script to my C script,
and both have wwwuser priveleges so they cannot write files! Please
help!!
Thanks
Akshat Bhargava
------------------------------
Date: Sun, 2 May 1999 18:20:01 +0200
From: "R!k" <rusenet@bigfoot.com>
Subject: Perl error: wat is dit?
Message-Id: <7ghtue$lrl$1@enterprise.cistron.nl>
Ik gebruik use strict echter dt brengt de volgende errors met zich mee:
Global symbol "dir" requires explicit package name at test.pl line 14.
Global symbol "INPUT_FILE" requires explicit package name at test.pl line
16.
Global symbol "desc" requires explicit package name at test.pl line 18.
Global symbol "file" requires explicit package name at test.pl line 22.
Global symbol "elem" requires explicit package name at test.pl line 25.
Global symbol "count" requires explicit package name at test.pl line 29.
Global symbol "smaller" requires explicit package name at test.pl line 30.
Als ik de regel use strict er niet bij zet krijg ik gewoon output.
Weet iemand wat de errors zijn en hoe ik het dan wel moet doen?
Rik
------------------------------
Date: 2 May 1999 10:30:12 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl error: wat is dit?
Message-Id: <372c7d94@cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, "R!k" <rusenet@bigfoot.com> writes:
:Ik gebruik use strict echter dt brengt de volgende errors met zich mee:
Bummer, eh? :-)
:Global symbol "dir" requires explicit package name at test.pl line 14.
...
:Als ik de regel use strict er niet bij zet krijg ik gewoon output.
:Weet iemand wat de errors zijn en hoe ik het dan wel moet doen?
Well yes, I do, but I will not respond in a language I purport not to
understand. :-)
man perldiag
man strict
Aren't you really monoglot Dutch? You'd be the first I've met.
How often do you post to a non-nl.* newsgroup in Dutch and
get useful and complete answers?
Harrumph.
--tom
--
"Patriotism is the last refuge of the scoundrel."
- Samuel Johnson
------------------------------
Date: Sun, 2 May 1999 09:52:05 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Perl error: wat is dit?
Message-Id: <MPG.1196228d93914796989995@nntp.hpl.hp.com>
[Posted and a courtesy copy sent.]
In article <7ghtue$lrl$1@enterprise.cistron.nl> on Sun, 2 May 1999
18:20:01 +0200, R!k <rusenet@bigfoot.com> says...
> Ik gebruik use strict echter dt brengt de volgende errors met zich mee:
>
> Global symbol "dir" requires explicit package name at test.pl line 14.
> Global symbol "INPUT_FILE" requires explicit package name at test.pl line
> 16.
> Global symbol "desc" requires explicit package name at test.pl line 18.
> Global symbol "file" requires explicit package name at test.pl line 22.
> Global symbol "elem" requires explicit package name at test.pl line 25.
> Global symbol "count" requires explicit package name at test.pl line 29.
> Global symbol "smaller" requires explicit package name at test.pl line 30.
>
> Als ik de regel use strict er niet bij zet krijg ik gewoon output.
> Weet iemand wat de errors zijn en hoe ik het dan wel moet doen?
Sorry, I can't answer in Dutch or Afrikaans or Flemish or whatever that
is. :-(
Those error messages refer to symbols that have to be fully qualified
when used:
$Foo::dir = '';
or declared before their use, either globally by:
use vars '$dir';
or lexically by:
my $dir;
I don't know how you got those error messages on barewords. It would
help if you showed some actual code.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 02 May 1999 09:18:35 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Possible to modify gif/jpeg images with Perl??
Message-Id: <m1d80jh2ck.fsf@halfdome.holdit.com>
>>>>> "Jonathan" == Jonathan Stowe <gellyfish@gellyfish.com> writes:
Jonathan> Sheesh ! That will be :
Jonathan> <http://www.perl.com/CPAN/authors/id/JCRISTY/PerlMagick-4.23.tar.gz>
Jonathan> Got that.
Except last time I checked, the version in the CPAN appears to want to
be immediately below the ImageMagick build directory in order to compile
(some includes are -I../something). And since the PerlMagick distribution
*also* comes with the ImageMagick distribution, there's never any point
in using the version from the CPAN. :)
Silly them. They should just put a pointer to the real distribution
and be done with it. After all, PerlMagick contains no documentation;
you're forced to look at the original distribution anyway.
Of course, compiling ImageMagick and PerlMagick is always a black art.
Seems to require about three or four "make -k all install" cycles to
get it to work properly. Must be because some of the includes are
coming from the install directories instead of the build directories.
And I'm not the only one that reports that. :)
print "Just another Perl hacker,"
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Sun, 02 May 1999 17:26:46 GMT
From: Igor Berg Mogielnicki <iggepop@my-dejanews.com>
Subject: Re: Question : Maybe I missed something about arrays, how do i clean up my code to get rid of those warningmessages?
Message-Id: <7gi1t7$5l5$1@nnrp1.dejanews.com>
open (APACHECONF,$_[0]) || die "couldent open Apache config file";
$order = 0;
while (<APACHECONF>)
{
if (/^<VirtualHost.*>/i)
{
$hoststart[$order] = $.;
}
if (/<\/VirtualHost>/i)
{
$hostend[$order] = $.;
$order++;
}
}
close(APACHECONF);
Hi Eric, thanks for your response, sorry I posted the message three
times to the newsgroup, but Dejanews acts in mysterious ( telling me
that an error accured when the message was sent.) ways sometimes and
posting to my isp:s news server seems that the message end up in the
land of /dev/null.
I didn't think of you logic expression myself but I agree it was the
best to use. Im aware that the order is important but I succeded makeing
it work. I still posted the source where the order is set, just to show
you it's done, cause i still get :
Use of uninitialized value at ./home2.pl line 167, <APACHECONF> chunk
#insert_the_array_number_here.
And the line 167 reads :
if (($. >= $hoststart[$b]) && ($. <= $hostend[$b]))
If i don't use the -w switch, It won't complain a bit. So, it must be
something about the $hoststart[$b] and $hostend[$b]. But the strange
thing is that the code works fine doing what it should. I just dont
wan't warnings cause that feels like lame codeing.
Best Regards
Igor Berg Mogielnicki
----- Posted via Deja.com, The People-Powered Information Exchange -----
------ http://www.deja.com/ Discussions * Ratings * Communities ------
------------------------------
Date: Sun, 02 May 1999 16:30:12 GMT
From: swistow@my-dejanews.com
Subject: Re: RegExp for escape characters
Message-Id: <7ghuik$30p$1@nnrp1.dejanews.com>
> However I want to increase functionality by allowing escape characters such
> that
>
> ${foo} => bar
> \${foo} => ${foo}
> \\${foo} => \bar
> \\\${foo} => \${foo}
>
> and any arbitary '\'s not followed by ${foo} will remain the same
>
> \\\ some stuff ${foo} => \\\ some stuff bar
>
> I've been trying for a couple of days to get this right and haven't come up
> with anything that works properly (sometimes I get it correctly replacing the
> slashes sometimes the variable but never both at the same time or if it does
> it goes into an infinite loop even using \G).
I finally got some code that worked even though it's even uglier than the
other code.
sub replace_escaped_vars
{
my $value = shift;
my $newvalue = "";
# whilst we have escaped variables
while ($value =~ m/(\\+)\${[a-z]+}/cg)
{
# get the slashes
$slashes = $1;
# split the string before and after the match
($left,$value) = split(/\\+/,$value,2);
# check to see if there's a variable after
# (otherwise we can split \\ \\${foo} in
# the wrong place
if ($value =~ s/^\${([a-z]+)}//)
{
# if it's an even number of slashes
if ((length $slashes)%2==0){
# work out the appropriate replacement
$replacer=get_value($1);
$value=~s/^\${$1}//; $add = $replacer;
}else{
$add ="\${$1}";
}
# and how many slashes we should put in
$newslashes = "\\" x ((length $slashes)/2);
}else{
# umm no var after so we'll just keep it like it is
$newslashes=$slashes; $add="";
}
# replace any non escaped vars to the left of the slashes
$left = replace_vars($left);
# stick the correctly parsed stuff on the output
$newvalue .= "$left$newslashes$add";
}
# finally replace any vars to the right of the last slashes
$newvalue .= replace_vars($value);
# and return the correctly parsed value
return $newvalue;
}
sub replace_vars
{
my $value = shift;
# keep checking to see if there's a variable
while ($value =~ m/\${([\w\d]+)}/gi){
# if it has one, then substitute it and carry on
if (my $replacer = get_value($1)){$value =~ s/\${$1}/$replacer/g;}
}
return $value;
}
basically what it does is split the string up at a load of slashes. The left
hand side can't have any slashes in it so any variables in that are okay to
replace so we can run them trhough my old routine (which could deal with
non-escaped variables).
If the right hand side begins with a variable and then number of matched was
even then replace the variable and half the slashes. If the number of slashes
was odd just half the slashes. If the right hand side didn't begin with a
variable then then don't half the slashes.
Then add the left hand side, the new number of slashes and the replaced
variable if necessary to all the sentence we've parsed so far and recurse
with the right hand side. When the right hand side has no slashes in it then
just replace any variables in it and then we're done.
If anyone can think of a nicer way of doing it then I'd be really grateful.
Simon Wistow
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 02 May 1999 09:30:22 -0700
From: Mike Coffin <mhc@Eng.Sun.COM>
Subject: Re: Sorting numbers
Message-Id: <8p6d80jbfj5.fsf@Eng.Sun.COM>
"Bas van Reek" <basvreek@xs5all.nl> writes:
> I wrote a search script that gives points to the search results,
> after that it (reverse) sorts the results by the points.
> But now comes the problem :
>
> eg. The sorted result looks like this :
> 10
> 110
> 21
> 2200
> 300
>
> As you can see, the sorting routine sorts on the first number.
Actually, it's sorting alphabetically. Kinda silly, but very well
documented. Use
sort {$a <=> $b} @list;
to sort numerically.
-mike
(Not speaking for my employer.)
------------------------------
Date: 02 May 1999 12:44:36 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Throw a person a fish...
Message-Id: <x7r9oz4e17.fsf@home.sysarch.com>
>>>>> "TC" == Tom Christiansen <tchrist@mox.perl.com> writes:
TC> [courtesy cc of this posting sent to cited author via email]
TC> In comp.lang.perl.misc, Jonathan Stowe <gellyfish@gellyfish.com> writes:
TC> :I'm glad I'm not the only one who gets unsolicited requests for help ...
TC> You have *NO* *IDEA*. :-(
not nearly as much as tom but,
<aol>me too!</aol>
it seems these types lurk and are to scared to post publicly so they
pick an apparently nice (well maybe not tom :-) hacker to mail their
problem directly to.
tom probably get much more since his name is emblazoned on several
relatively popular perl books. :-)
we should reply to them that the proper arena for their questions is
usenet instead of private mail. that shares the load of replying RTFM
and RTFFAQ to all of us.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Sun, 02 May 1999 16:46:30 +0000
From: Jason Holland <jason.holland@dial.pipex.com>
Subject: Re: Unix files in MacPerl
Message-Id: <372C8166.2DCF093A@dial.pipex.com>
Arved Sandstrom wrote:
> No need to explain. :-) I use Windows at work, and MacOS/PPC Linux at
> home. So files are coming into all 3 OS's, and leaving all 3 OS's, and to
> save my sanity I now use 2 well-defined directories on each system -
> Downloads and Uploads (or In and Out... :-)) Files coming into an OS first
> go into Downloads; I batch convert text files here using a MacPerl script.
> Makes life easier.
>
> Just out of curiosity, what are you you using for tar? The reason I ask is
> that ported tar utilities, *and* Stuffit Expander, don't do too well with
> text file line-end conversions. Chris Nandor has 2 general utilities
> called 'tarzipme' and 'untarzipme' - Perl scripts both - which are really
> handy.
>
> Arved
Hello Arved,
Sorry for the delay...
On the Mac I use a program called "SunTar", I seem to remember getting
it via MacOS8.com or somewhere. I believe that it's updated on a regular
basis so it shouldn't be too hard to find.
I don't know about the Windows side though. Perhaps some of the GNU
tools are available, including GNU tar? I don't really use Windows at
home, or at work, much.
Bye!
--
Jason Holland - < "I could probably write a script for that..." >
email: jason.holland@dial.pipex.com
web: http://dspace.dial.pipex.com/jason.holland/
can do: Perl 5, html, JavaScript, Linux, Mac, Photoshop, everything
else...
------------------------------
Date: 2 May 1999 13:12:36 GMT
From: Stefaan.Eeckels@ecc.lu (Stefaan A Eeckels)
Subject: Re: unos problemitas
Message-Id: <7ghj04$8uc$1@justus.ecc.lu>
In article <BHOW2.2226$fO5.68295@news14.ispnews.com>,
pacman@defiant.cqc.com (Alan Curry) writes:
> In article <MPG.119534f1a7c0efc498998e@nntp.hpl.hp.com>,
> Larry Rosler <lr@hpl.hp.com> wrote:
>>"No problemo!" is pure Simpson-speak.
>
> Didn't ALF say it a few years earlier?
Didn't he say something like "Nil problemo"?
--
Stefaan
--
PGP key available from PGP key servers (http://www.pgp.net/pgpnet/)
___________________________________________________________________
Perfection is reached, not when there is no longer anything to add,
but when there is no longer anything to take away. -- Saint-Exupiry
------------------------------
Date: Sun, 2 May 1999 07:18:16 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: using perl to manage passwords?
Message-Id: <o9chg7.vv.ln@magna.metronet.com>
Dan Baker (dtbaker@bus-prod.com) wrote:
: Tom Christiansen wrote:
: >
: > [courtesy cc of this posting sent to cited author via email]
: >
: > In comp.lang.perl.misc,
: > Dan Baker <dtbaker@bus-prod.com> writes:
: > :I'm sure you all would agree that with the size and scope of the
: > :documentation, it is entirely possible that not everyone knows right
: > :where to look.
: >
: > Being too lazy to run a simple grep is a capital crime, one that
: > carries with it its own punishment.
: ----------------
: mmmm, well... running on windoze is a special sort of mitigating factor;
Your choice of "Operating System" does not exempt you from
the rules of netiquette.
If word searching across multiple files is hard on the system
you have selected, that is a consequence of _your_ choice of OS.
You just have to do more work than you would on other systems.
Usenet should not be punished with repeats of questions that
have already been answered because you lack tools.
Your lack of tools is your problem, not the internet's.
But, you don't lack tools!
Because you have the Swiss Army Chainsaw (Perl) available!
: like being raised in an abusive family.
Dahmer: I ate them because I was raised in an abusive family.
Judge: Oh. OK. Case dismissed.
not!
: It is not a minor matter to grep
: the perdocs as far as I have been able to determine.
Doesn't 'perldoc' work on M$ systems?
perldoc -q password
finds that FAQ on my system...
: If there is a good
: way to do so, I'd love to hear about it! The docs are all there on my
: installation, but I haven't found any really good way to find out where
: to start looking when in unfamiliar ground in the windows environment.
I use these methods to find stuff in the PODs (someone please
correct them for Windoze if needed. I don't use it):
1) make up some "indexes", then you only have to word search
a single file:
perl -ne 'print qq{$ARGV: $_} if /^=/' perlfaq[1-9].pod >faq_heads
perl -ne 'print qq{$ARGV: $_} if /^=/' *.pod >all_heads
perl -ne 'print if s/^=head2 perl/perl/' perltoc.pod >pod_file_index
2) write grep as a perl one-liner:
perl -ne 'print qq{$ARGV: $_} if /searchword/' *.pod
No problemo!
:-)
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 02 May 1999 13:10:18 -0400
From: Huy Le <huymle@gis.net>
Subject: Re: Where is HeaderParser.pm?
Message-Id: <372C86FA.B0EA059C@gis.net>
Thanks Jim. I found it.
Huy
Jim Britain wrote:
> On Sun, 02 May 1999 06:41:18 -0400, Huy Le <huymle@gis.net> wrote:
>
> >What Perl module contains HeaderParser.pm and where can I find it?
> >Thanks for you help.
> >
> >Huy
> smaster 1# perl -MCPAN -e shell
>
> cpan shell -- CPAN exploration and modules installation (v1.48)
> ReadLine support enabled
>
> cpan> i /HeaderParser/
> No objects found of any type for argument /HeaderParser/
>
> cpan> i /Header/
> Distribution ANDK/Apache-correct_headers-1.15.tar.gz
> Distribution J/JN/JNEYSTADT/http-headers-useragent-1.00.tar.gz
> Module Apache::DumpHeaders
> (DOUGM/Apache-Perl-contrib-022398.tar.gz)
> Module Apache::correct_headers
> (ANDK/Apache-correct_headers-1.15.tar.gz)
> Module Audio::Wav::Write::Header
> (N/NP/NPESKETT/Audio-Wav-0.01.tar.gz)
> Module Games::Rezrov::ZHeader
> (E/ED/EDMONSON/Games-Rezrov-0.16.tar.gz)
> Module HTTP::Header::ETag (GAAS/libwww-perl-5.42.tar.gz)
> Module HTTP::Headers (GAAS/libwww-perl-5.42.tar.gz)
> Module HTTP::Headers::Auth (GAAS/libwww-perl-5.42.tar.gz)
> Module HTTP::Headers::UserAgent
> (J/JN/JNEYSTADT/http-headers-useragent-1.00.tar.gz)
> Module HTTP::Headers::Util (GAAS/libwww-perl-5.42.tar.gz)
> Module Mail::Header (GBARR/MailTools-1.13.tar.gz)
> Module Net::DNS::Header (MFUHR/Net-DNS-0.12.tar.gz)
> Module Net::Hotline::Protocol::Header
> (J/JS/JSIRACUSA/Net-Hotline-0.73.tar.gz)
>
> cpan> i /Parser/
> Distribution BRADAPP/PodParser-1.081.tar.gz
> Distribution C/CO/COOPERCL/XML-Parser-2.23.tar.gz
> Distribution GAAS/HTML-Parser-2.22.tar.gz
> Distribution PVERD/RTF-Parser-1.05.tar.gz
> Distribution PVERD/RTF-Parser-1.06.tar.gz
> Distribution R/RB/RBERJON/CSS-Parser-0.05.tar.gz
> Module AstDumpParser (SRIRAM/examples.tar.gz)
> Module CSS::Parser (R/RB/RBERJON/CSS-Parser-0.05.tar.gz)
> Module CSSPrinter (R/RB/RBERJON/CSS-Parser-0.05.tar.gz)
> Module DailyUpdate::Parser
> (D/DC/DCOPPIT/DailyUpdate-7.00.tar.gz)
> Module GetWeb::Parser (RHNELSON/GetWeb-1.11.tar.gz)
> Module HTML::Entities (GAAS/HTML-Parser-2.22.tar.gz)
> Module HTML::Filter (GAAS/HTML-Parser-2.22.tar.gz)
> Module HTML::HeadParser (GAAS/HTML-Parser-2.22.tar.gz)
> Module HTML::LinkExtor (GAAS/HTML-Parser-2.22.tar.gz)
> Module HTML::Mason::Parser
> (J/JS/JSWARTZ/HTML-Mason-0.4.tar.gz)
> Module HTML::Parser (GAAS/HTML-Parser-2.22.tar.gz)
> Module HTML::TokeParser (GAAS/HTML-Parser-2.22.tar.gz)
> Module MIME::Parser (ERYQ/MIME-tools-4.122.tar.gz)
> Module MIME::ParserBase (ERYQ/MIME-tools-4.122.tar.gz)
> Module Mail::IspMailGate::Parser
> (JWIED/Mail-IspMailGate-1.003.tar.gz)
> Module PDL::Pod::Parser (KGB/PDL-2.0.tar.gz)
> Module POP::POX_parser (B/BH/BHOLZMAN/pop-0.05.tar.gz)
> Module POP::Schema_parser (B/BH/BHOLZMAN/pop-0.05.tar.gz)
> Module Parser (HVDS/Codex-0.01.tar.gz)
> Module Pod::Checker (BRADAPP/PodParser-1.081.tar.gz)
> Module Pod::InputObjects (BRADAPP/PodParser-1.081.tar.gz)
> Module Pod::Parser (BRADAPP/PodParser-1.081.tar.gz)
> Module Pod::PlainText (BRADAPP/PodParser-1.081.tar.gz)
> Module Pod::Select (BRADAPP/PodParser-1.081.tar.gz)
> Module Pod::Usage (BRADAPP/PodParser-1.081.tar.gz)
> Module RPCLParser (JAKE/perlrpcgen-0.71a.tar.gz)
> Module RTF::Charsets (PVERD/RTF-Parser-1.06.tar.gz)
> Module RTF::Config (PVERD/RTF-Parser-1.06.tar.gz)
> Module RTF::Control (PVERD/RTF-Parser-1.06.tar.gz)
> Module RTF::HTML::Converter (PVERD/RTF-Parser-1.06.tar.gz)
> Module RTF::HTML::Output (PVERD/RTF-Parser-1.05.tar.gz)
> Module RTF::Parser (PVERD/RTF-Parser-1.06.tar.gz)
> Module Reference_Parser
> (H/HL/HLHAMILT/Getopt-ExPar-0.01.tar.gz)
> Module SGML::Parser (EHOOD/perlSGML.1997Sep18.tar.gz)
> Module SGML::StripParser (EHOOD/perlSGML.1997Sep18.tar.gz)
> Module SchemaParser (SRIRAM/examples.tar.gz)
> Module TemplateParser (SRIRAM/examples.tar.gz)
> Module Text::Parser (Contact Author Pat Martin
> <pat@bronco.advance.com>)
> Module VRML::Parser (LUKKA/FreeWRL-0.14.tar.gz)
> Module X500::DN::Parser (R/RS/RSAVAGE/X500-DN-1.11.tgz)
> Module XML::Parser (C/CO/COOPERCL/XML-Parser-2.23.tar.gz)
> Module XML::Parser::Expat
> (C/CO/COOPERCL/XML-Parser-2.23.tar.gz)
> Module XML::Parser::Grove (KMACLEOD/XML-Grove-0.05.tar.gz)
> Module XML::XQL::Parser (E/EN/ENNO/XML-XQL-0.60.tar.gz)
>
> cpan>
------------------------------
Date: 02 May 1999 09:14:17 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Who is Just another Perl hacker?
Message-Id: <m1hfpvh2jq.fsf@halfdome.holdit.com>
>>>>> "Juho" == Juho Cederstrom <cederstrom@kolumbus.REMOVE_THIS.fi> writes:
Juho> But when do I become Just another Perl hacker? Who are they? I've read
Juho> the FAQ, but it doesn't answer my question. If I replace my email
Juho> signature with JAPH, do I break some kind of law?
Juho> Or is Just another Perl Hacker a person who just hacks Perl?
Well, this ol' JAPH thing started back in 88-ish when I was posting to
a bunch of different newsgroups, and would sign each message somewhat
individualized above the "-- " cut. For a while, it was stuff like:
Randal L. "Some Clever Phrase Here" Schwartz
and I'd change the phrase to fit. I got bored with retyping my name
repeatedly, so I start using:
Just another <subject> hacker,
in each news group, changing <subject> as appropriate. When I started
posting to the Perl newsgroup frequently, I just repeatedly typed:
Just another Perl hacker,
and that got boring, so I stepped it up to Perl code:
print "Just another Perl hacker,"
but again, that lacked the ability to soak up my then-spare-time, so
I started making them a bit more clever, like:
print join " ", reverse split ' ', "hacker, Perl another Just"
and that started a trend of me constantly trying to outdo myself in
each posting. The one that decoded morse code was probably one of my
favorites, as was the "old macdonald" one that is now immortalized in
Jeffrey's "Mastering Regular Expressions" (from O'Reilly). A few
others got into the act... notably one Mr. Larry Wall who wrote code
to pick a random article of mine out of his news spool, run the code,
but print "Not " in front of it!
I have a little less spare time these days, so the JAPH signoffs have
been pretty plain <sigh>. But I occasionally sneak something in that
relates to what I'm answering.
So, in answer to your question, feel free to declare yourself a JAPH,
but most of us around here agree that I'm JAPH # 0. :)
print "Just another Perl hacker,"
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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.misc (and this Digest), send your
article to perl-users@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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 5543
**************************************