[8695] in Perl-Users-Digest
Perl-Users Digest, Issue: 2312 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 13 22:07:16 1998
Date: Mon, 13 Apr 98 19:00:29 -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 Mon, 13 Apr 1998 Volume: 8 Number: 2312
Today's topics:
Re: [Q] find largest value in key of associative array? <ebohlman@netcom.com>
Re: [Q] find largest value in key of associative array? <danboo@negia.net>
Re: [Q] find largest value in key of associative array? <danboo@negia.net>
Re: Apache/ModPerl Question <mschout@gkg.net>
automating a terminal session (John Richardson)
Re: Can I install perl5.004_04 myself? (Jeff Yoak)
Converting a scalar data to ACII format. <a-namsuk@microsoft.com>
Re: Converting a scalar data to ACII format. <sneaker@earthling.net>
Re: File download problem in IE4.0 <gwynne@utkux.utk.edu>
Re: File download problem in IE4.0 <grinch@whoville.com>
Re: File download problem in IE4.0 <kenner@xnet.com>
Re: File Upload <rootbeer@teleport.com>
Re: formatting localtime output <lr@hpl.hp.com>
Re: help with delimiters <scott@rappahannock-web.com>
Re: Hide or Encrypt perl source code <eslcafe@callisto.si.usherb.ca>
Re: Hide or Encrypt perl source code <a-namsuk@microsoft.com>
Re: Hide or Encrypt perl source code <sneaker@earthling.net>
Re: Hide or Encrypt perl source code (Matthew Cravit)
Re: Hide or Encrypt perl source code (Mike King)
Re: How to upload multiple graphic files at once ? <grinch@whoville.com>
Re: i want to learn Perl. HELP! <eslcafe@callisto.si.usherb.ca>
Re: i want to learn Perl. HELP! (Rich Morin)
Re: i want to learn Perl. HELP! <grinch@whoville.com>
Re: looking for a good win32 perl editor. (Martien Verbruggen)
Re: Need to find web-based e-mail client in Perl! <ljz@asfast.com>
Re: Need to find web-based e-mail client in Perl! <grinch@whoville.com>
Re: Need to find web-based e-mail client in Perl! (Martien Verbruggen)
Re: Numeric validation <ebohlman@netcom.com>
Re: Perl 5.004_64 Slower??? <eslcafe@callisto.si.usherb.ca>
Re: Perl 5.004_64 Slower??? <sneaker@earthling.net>
Perl, HP-UX, and memory ... wvw@fred.net
Re: Q: I need to delete temp files after 24 hours... <wd@denx.muc.de>
Re: Relevance flames considered harmful (was Re: Q: For <rootbeer@teleport.com>
SNMP Support for PERL 5.0 question <masroor@bga.com>
Re: Username/password required w/ Netscape, Help! <grinch@whoville.com>
Re: wc -l in perl is?????? <mschout@gkg.net>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 14 Apr 1998 00:44:16 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: [Q] find largest value in key of associative array?
Message-Id: <ebohlmanErDops.K6C@netcom.com>
Mark-Jason Dominus <mjd@op.net> wrote:
: In article <comdog-ya02408000R1304981339320001@news.panix.com>,
: brian d foy <comdog@computerdog.com> wrote:
: >why is everyone trying to sort?
: Because it leads to smaller code.
YM "less typing." The sort method uses up a lot more memory, since space
has to be allocated to hold the sorted list, all but one element of which
is then discarded.
: > you only need to look at each key once!
: I posted the each-key-once solution too, but I think there's a place
: for the sort solution.
For 10,000 items, the each-key-once solution requires 9,999 comparisons.
The sort solution requires 132,877 comparisons. The original poster
asked for the *fastest* method. The compiled C code inside sort()
probably does comparisons faster than an explicit comparison in Perl
does, but unless it's at least 13 times faster, the sort method loses
(not to mention the time spent allocating the sorted array and copying
data to it).
------------------------------
Date: Mon, 13 Apr 1998 21:15:44 -0400
From: Dan Boorstein <danboo@negia.net>
Subject: Re: [Q] find largest value in key of associative array?
Message-Id: <3532B8C0.44FA9A81@negia.net>
Abigail wrote:
>
> James Ludlow (ludlow@us.ibm.com) wrote on MDCLXXXVI September MCMXCIII in
> <URL: news:35320F00.E7CEC9F7@us.ibm.com>:
> ++ Stephen_Chan wrote:
> ++ >
> ++ > What's the fastest way to find the largest key value
> ++ > in an associative array? eg:
> ++ >
> ++ > %aa
> ++ >
> ++ > key value
> ++ > ---- ------
> ++ > 1 some_content_1
> ++ > 23 some_content_1
> ++ > 5 some_content_1
> ++ > 48 some_content_1
> ++ > . .
> ++ > . .
> ++ > N some_content_N
> ++ >
> ++ > In the above list, assume there's 10000 pairs and the
> ++ > 4634th key/value pair holds the largest key value of
> ++ > 34235. Do I have to manually iterate through to find it?
> ++
> ++ Alphabetically:
> ++ $largest_key = (sort keys %hash)[-1];
> ++
> ++ Numerically:
> ++ $largest_key = (sort {$a <=> $b} %hash)[-1];
>
> *PLEASE*
>
> What's the point of suggesting an Omega (N log N) algorithm
> if there's a trivial O (N)?
>
> foreach ($max = each %hash;
> defined ($a = each %hash);
> $max = $a if $a > $max) {}
if your concerns are speed and trivial code, then what's wrong with:
for (keys %hash) {
$max = $_ if $_ > $max;
}
it's fewer characters (i.e., faster to type), avoids a moderately
obfuscated foreach with a void block (i.e., more trivial code), and
by my benchmarks as fast as, if not faster.
just wondering,
--
dan boorstein
------------------------------
Date: Mon, 13 Apr 1998 20:43:51 -0400
From: Dan Boorstein <danboo@negia.net>
Subject: Re: [Q] find largest value in key of associative array?
Message-Id: <3532B147.F62C3782@negia.net>
Andrew F. Lee wrote:
>
> On Mon, 13 Apr 1998, Stephen_Chan wrote:
>
> $max = 0;
> for $key (%aa) {
> if($key > $max) {
> $max = $key;
> }
> }
>
> > What's the fastest way to find the largest key value
> > in an associative array? eg:
although the original poster does confuse the issue by using the term
'key value', i believe he was looking for one or the other. your method
finds the highest number whether it is a key or value.
--
dan boorstein
------------------------------
Date: Mon, 13 Apr 1998 18:54:08 -0500
From: Michael J Schout <mschout@gkg.net>
To: Jim Turner <turnerj@cliffy.lmtas.lmco.com>
Subject: Re: Apache/ModPerl Question
Message-Id: <3532A5A0.710F8017@gkg.net>
Jim Turner wrote:
> are otherwise ignored). Is there any way to cause the server to NOT send
> a header to the browser for you so that the browser will be expecting one
> (as is the case in normal CGI?) I have tried both using and not using
> CGI.pm.
>
> Thanks in advance for any help!!!!!!!!!!!
>
> Jim Turner
> jim.turner@lmco.com
Remove "PerlSendHeader On" from your httpd.conf file, and just use print
$q->header() as normal from CGI.pm.
More info is in perldoc cgi_to_mod_perl
Mike
--
Hal 9000 - "Put down those Windows disks Dave.... Dave? DAVE!!"
------------------------------
Date: Tue, 14 Apr 1998 00:05:56 GMT
From: wjr@cims.net (John Richardson)
Subject: automating a terminal session
Message-Id: <3532a7b5.5053491@news.cims.net>
I have used some modules in Perl, but was wondering if anyone could
recommend or direct me to a module that can basically do an
interactive terminal session (e.g. log in remotely, then execute some
commands -upload a file via x/y/zmodem actually- then logout).
Any suggestions? I have not used sockets from the nuts up in Perl
yet, so a module wold be preferred...but source code is always good
failing that :) Thanks muchly in advance.
John Richardson
--
John Richardson | "Past Experience...
V.P. Internet Operations | ...Forward Thinking"
CIMS Inc. | http://www.cims.net/
London, Ontario, | Phone: (519) 455-5331
Canada | Fax: (519) 455-0262
------------------------------
Date: Tue, 14 Apr 1998 01:24:53 GMT
From: jeff@yoak.com (Jeff Yoak)
Subject: Re: Can I install perl5.004_04 myself?
Message-Id: <6gudrc$lak@dfw-ixnews6.ix.netcom.com>
[posted and emailed]
John Taylor-Johnston <eslcafe@callisto.si.usherb.ca> wrote:
>My server doesn't have the extension modules I need from CPAN to run
>"use Net::SMTP;"
>I know where to find them
>http://www.perl.com/CPAN-local/modules
>Can I install perl myself, with the modules, under my public_html
>directory (UNIX SERVER), and then call my version of perl with my
>scripts using this syntax:
>#!/home/mycode/perl
>Instead of
>#!/usr/local/bin/perl
There's probably no reason to go through all that. Install the
modules you want locally and use them with the perl you already have
running. You'll need to make sure Perl can find them so you'll want
to include something like:
use lib '/home/mylib/';
in your programs. Hope this helps!
Cheers,
Jeff
--
Jeff Yoak jeff@yoak.com
------------------------------
Date: Mon, 13 Apr 1998 16:22:05 -0700
From: "Namsuk Kim" <a-namsuk@microsoft.com>
Subject: Converting a scalar data to ACII format.
Message-Id: <6gu71c$n1r@news.microsoft.com>
Is there a way to convert a scalar data to Acii data format?
------------------------------
Date: Tue, 14 Apr 1998 00:33:21 GMT
From: Bill 'Sneex' Jones <sneaker@earthling.net>
Subject: Re: Converting a scalar data to ACII format.
Message-Id: <3532AD46.3C49428C@earthling.net>
Namsuk Kim wrote:
> Is there a way to convert a scalar data to Acii data format?
I am not familar with ACII. If you mean ASCII, then the
question I have is - is the data in EBCDIC now?
--
__________________________
Bill Jones...............|
Sneaker's Nest...........|
Chasecreek Systemhouse...|
------------------------------
Date: Mon, 13 Apr 1998 19:57:14 -0400
From: "Bob Gwynne" <gwynne@utkux.utk.edu>
Subject: Re: File download problem in IE4.0
Message-Id: <6gu92o$t8q$1@gaia.ns.utk.edu>
Guys and gals. We are now calling the Web Client Programming with Perl book
the Abigail book as in Camel book, Llama book, etc. Take a look at the
cover. It has a drawing of Abigail, sweet thing that she is, devouring a
newbie. So from now on, it's the Abigail book!!!
Hey Abby baby, you will probably see this again, until I figure everyone has
read it. Keep up the good work, there's still plenty of fish in the sea.
Bob Gwynne
------------------------------
Date: Mon, 13 Apr 1998 20:44:41 -0400
From: "Grinch" <grinch@whoville.com>
Subject: Re: File download problem in IE4.0
Message-Id: <6guaod$if9@fridge.shore.net>
bidyut@yahoo.com wrote in message <6gtrom$sh0$1@nnrp1.dejanews.com>...
>i am still in the dark room!!!
Maybe you could give the CGI::Push module from CPAN a try. I haven't use it,
but it's got to be easier than rolling your own... :-)
Try 'perldoc CGI::Push' to see if it's installed. If not, try asking your
sysadmin to install it, or download it at <URL: http://www.perl.com > and
install it for yourself.
HTH!
-grinch
----
"Of course coffee doesn't make the world go around. It
just makes it go faster." - me
Sherm Pendley
grinch@whoville.com
http://www.whoville.com
------------------------------
Date: Mon, 13 Apr 1998 20:28:38 -0500
From: "Kenner Estes" <kenner@xnet.com>
Subject: Re: File download problem in IE4.0
Message-Id: <6gue1q$9la$1@flood.xnet.com>
Abby, sweetie - I think I love you.
------------------------------
Date: Tue, 14 Apr 1998 01:56:04 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: David <kupid@ecom.net>
Subject: Re: File Upload
Message-Id: <Pine.GSO.3.96.980413185237.13639D-100000@user2.teleport.com>
On Sun, 12 Apr 1998, David wrote:
> I'm trying to customize a File Upload program written in PERL/CGI. Does
> anyone know how to restrict the file size to 25 kilobytes -- so that
> people can't upload files larger than that to my server?
Yes. Probably the best way is to make sure that you're using a module
which supports upload file-size limits, then use the method from that
module's docs. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Mon, 13 Apr 1998 16:52:31 -0700
From: Larry Rosler <lr@hpl.hp.com>
To: Lee Falkenhagen <falkenl@hotmail.com>
Subject: Re: formatting localtime output
Message-Id: <3532A53F.2C36A040@hpl.hp.com>
Lee Falkenhagen wrote:
>
> I need to set the localtime output to be:
>
> YYYYMMDD
>
> and as
>
> YYYYMMDD HHminmin
>
> if you just return localtime, it truncates the leading zero for the month
> and date.
>
> Is there anyway to put it in there besides doing a "if less than 10, add
> '0' to string" routine?
>
> Thanks
$zero_padded_to_two_digits = sprintf '%02d', $whatever;
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com
------------------------------
Date: Mon, 13 Apr 1998 20:50:22 +0000
From: scott <scott@rappahannock-web.com>
To: Dan Boorstein <danboo@negia.net>
Subject: Re: help with delimiters
Message-Id: <35327A8C.3AAC90B4@rappahannock-web.com>
Dan Boorstein wrote:
>
> scott wrote:
> >
> > why does this work?
> > ($log,$name,$connect,$transmit,$receive,$protocol) = split /:/, $line;
> >
> > and this wants to return the number of items in $line?
> > ($log,$name,$connect,$transmit,$receive,$protocol) = split (/:/, $line);
> >
>
> could you post a bit of code that demonstrates this behavior? as far as i
> can see, these should behave identically.
>
> --
> dan boorstein
yes, here's the whole section where i encountered this odd behavior.
# this one does not work
$db_file = "/path_to_dir/test/datafiles/dat_o_base.dat";
print "Content-type: text/html\n\n";
print "<html><head><title>message</title></head><body bgcolor=\"ffffff\">\n";
open (DATABASE,"$db_file");
while ($dbrows = <DATABASE>){
($one,$two,$three,$four,$five) = (split /\|/, $dbrows);
print "f1 $one<br>\n"; # returns the number of fields!
print "the row, $dbrows<br>\n"; # returns the row, as expected
}
print "</body></html>\n";
close (DATABASE);
exit;
#the_end
and the second example that works as expected.
# this one works ok!
$db_file = "/path_to_dir/test/datafiles/dat_o_base.dat";
print "Content-type: text/html\n\n";
print "<html><head><title>message</title></head><body bgcolor=\"ffffff\">\n";
open (DATABASE,"$db_file");
while ($dbrows = <DATABASE>){
($one,$two,$three,$four,$five) = split /\|/, $dbrows;
print "f1 $one<br>\n"; # returns the contents of the first field
print "the row, $dbrows<br>\n"; #
}
print "</body></html>\n";
close (DATABASE);
exit;
#the_end
something to do with a scalar as opposed to array context? i really don't see
the difference.
--
Thanks,
Scott Prince
------------------------------
Date: Mon, 13 Apr 1998 23:59:40 GMT
From: John Taylor-Johnston <eslcafe@callisto.si.usherb.ca>
To: Gabor <gabor@vmunix.com>
Subject: Re: Hide or Encrypt perl source code
Message-Id: <32FE5CFE.785F@callisto.si.usherb.ca>
In comp.lang.perl.misc, Ye Ye <yey@cvilaser.com> wrote :
# I am trying to write a system utility using Perl,
# is there a way that I can hide or encrypt my source
# code, but still able to run it?
What I do is chmod 711 which allows the public to execute the script,
but not read it. I do it with all my scripts.
If it is just your page (on your server only) that you want to execute
the script, chmod 700 which allows read, write,execute from your pages
on your server only.
Most scripts you pick up reccomend chmod 755 or 777, which are too
dangerous in my mind. If I want other people to access my script, I
chmod 711 (exeucte priveledges from the public only). If not I chmod 700
to only aloow my pages to access teh script.
Hope this helps
(I saw someone's scarcastic response and felt bad. Forget those idiots.)
------------------------------
Date: Mon, 13 Apr 1998 16:23:53 -0700
From: "Namsuk Kim" <a-namsuk@microsoft.com>
Subject: Re: Hide or Encrypt perl source code
Message-Id: <6gu74n$ukc@news.microsoft.com>
You mean you want it to be binary. Try perl2exe.
Ye Ye wrote in message <35328B7A.37C1@cvilaser.com>...
>I am trying to write a system utility using Perl,
>is there a way that I can hide or encrypt my source
>code, but still able to run it?
>
>Thanks for any suggestions.
>
>Ye
------------------------------
Date: Tue, 14 Apr 1998 00:20:20 GMT
From: Bill 'Sneex' Jones <sneaker@earthling.net>
Subject: Re: Hide or Encrypt perl source code
Message-Id: <3532AA3A.E18A7CEF@earthling.net>
John Taylor-Johnston wrote:
> (I saw someone's scarcastic response and felt bad. Forget those idiots.)
But you didn't mind blasting MacPerl a second ago...
Mac Perl does run slower on my 7100, but hey,
a G3 it isn't...
Besides, I would fully expect it to smoke on an
Ultra-1 or E3000, and even perform decent on
a RedHat Hurricane P100. But we all can't own
Ultra-1's or E3000 :-)
--
__________________________
Bill Jones...............|
Sneaker's Nest...........|
Chasecreek Systemhouse...|
------------------------------
Date: 13 Apr 1998 17:23:22 -0700
From: mcravit@best.com (Matthew Cravit)
Subject: Re: Hide or Encrypt perl source code
Message-Id: <6gua9q$t42$1@shell3.ba.best.com>
In article <32FE5CFE.785F@callisto.si.usherb.ca>,
John Taylor-Johnston <eslcafe@callisto.si.usherb.ca> wrote:
>In comp.lang.perl.misc, Ye Ye <yey@cvilaser.com> wrote :
># I am trying to write a system utility using Perl,
># is there a way that I can hide or encrypt my source
># code, but still able to run it?
>
>What I do is chmod 711 which allows the public to execute the script,
>but not read it. I do it with all my scripts.
Out of curiosity, on what kind of system are you running this, and what do
the permissions on your perl binary look like? On a normal installation of
Perl on any *NIX variant I know of, this shouldn't (and in fact, doesn't)
work:
$ ls -l /tmp/trial.pm
-rwx--x--x 1 mcravit users 62 Apr 13 17:16 /tmp/trial.pm*
$ /tmp/trial.pm
This is my secret utility
$ su - user2
Password:
% /tmp/trial.pm
Can't open perl script "/tmp/trial.pm": Permission denied
I could see how this _might_ work if the Perl binary (and/or your web server
if this is a CGI script) were setuid-root, but by definition the perl
interpreter MUST be able to read the file if it is to interpret it. The
"chmod 711" method will work for compiled binaries, but will not work for
scripts unless you're doing setuid games, which is potentially VERY dangerous.
The answer to this question is given in some detail in section 3 of the Perl
FAQ, under the title:
How can I hide the source for my Perl program?
Hope this helps.
/MC
--
Matthew Cravit, N9VWG | Experience is what allows you to
E-mail: mcravit@best.com (home) | recognize a mistake the second
mcravit@net.com (work) | time you make it.
------------------------------
Date: Mon, 13 Apr 1998 23:43:50 GMT
From: m.king.garbage@praxa.garbage.com.au (Mike King)
Subject: Re: Hide or Encrypt perl source code
Message-Id: <3532a24f.1363282556@news.ozemail.com.au>
Any complex perl program is obscure at the best of times. If you are
running on 95/NT, there is a Perl2Exe convertor which will 'shrink
wrap' your code for you.
No need to be so paranoid. Who are you scared of ? Other programmers,
or your customers ? Any commercial operation will want you to support
your software - remember that copy protection schemes disappeared with
the ark (mostly).
Cheers
Mike
On Mon, 13 Apr 1998 16:02:34 -0600, Ye Ye <yey@cvilaser.com> wrote:
>I am trying to write a system utility using Perl,
>is there a way that I can hide or encrypt my source
>code, but still able to run it?
>
>Thanks for any suggestions.
>
>Ye
------------------------------
Date: Mon, 13 Apr 1998 20:48:53 -0400
From: "Grinch" <grinch@whoville.com>
Subject: Re: How to upload multiple graphic files at once ?
Message-Id: <6gub09$in9@fridge.shore.net>
krzych@altavista.net wrote in message <6gtjiv$elo$1@nnrp1.dejanews.com>...
>Hi Does anybody know how to upload many graphic files at the push of a
>button? 100 pictures or so? Can I do it in Perl?
The Net::FTP module implements file transfers.
-grinch
--
"Of course coffee doesn't make the world go around. It
just makes it go faster." - me
Sherm Pendley
grinch@whoville.com
http://www.whoville.com
------------------------------
Date: Tue, 14 Apr 1998 00:06:31 GMT
From: John Taylor-Johnston <eslcafe@callisto.si.usherb.ca>
To: bernie <deforest@mkl.com>
Subject: Re: i want to learn Perl. HELP!
Message-Id: <32FE5E99.3675@callisto.si.usherb.ca>
bernie wrote:
>
> i have been into the Internet for a while but, only have learned HTML.
> i thought that i chould expand my learning to Perl but, i don't know how to
> get started.
> if anyone knows of any sites that could help me or books please tell me, i
> would be very greatful.
Here's one place to start:
http://www.tesol.net/scripts/Class/
You're going to need access to your server through ftp and probably
telnet. Start with this link. It's simple and basic enough to give you
an idea. If not check my tutorial for my students at:
http://mail.antoine-girouard.qc.ca/info_5/form/default.html
It's in French, but you might be able to follow.
------------------------------
Date: Mon, 13 Apr 1998 17:56:09 -0700
From: rdm@cfcl.com (Rich Morin)
Subject: Re: i want to learn Perl. HELP!
Message-Id: <rdm-1304981756400001@140.174.42.30>
In article <6gu8g7$h7v$1@news0-alterdial.uu.net>, "bernie"
<deforest@mkl.com> wrote:
> i have been into the Internet for a while but, only have learned HTML.
> i thought that i chould expand my learning to Perl but, i don't know how to
> get started.
> if anyone knows of any sites that could help me or books please tell me, i
> would be very greatful.
The first several chapters of "MacPerl: Power and Ease" present general
programming concepts, followed by a "gentle introduction" to (Mac-)Perl
programming. If you are not a Mac user, you can skip a few footnotes and
still get a good grounding in Perl programming. The book is online at:
http://www.ptf.com/macperl/ptf_book/HTML
-r
--
Canta Forda Computer Laboratory | Prime Time Freeware - quality
UNIX consulting, training, & writing | freeware at affordable prices
+1 415-873-7841 | +1 408-433-9662 -0727 (Fax)
Rich Morin, rdm@cfcl.com | www.ptf.com, info@ptf.com
------------------------------
Date: Mon, 13 Apr 1998 20:54:53 -0400
From: "Grinch" <grinch@whoville.com>
Subject: Re: i want to learn Perl. HELP!
Message-Id: <6gubbi$j74@fridge.shore.net>
bernie wrote in message <6gu8g7$h7v$1@news0-alterdial.uu.net>...
>i have been into the Internet for a while but, only have learned HTML.
> i thought that i chould expand my learning to Perl but, i don't know how
to
>get started.
>if anyone knows of any sites that could help me or books please tell me, i
>would be very greatful.
The first place to start on the web would be the CPAN home page at <URL:
http://www.perl.com >. You'll find all kinds of docs, tutorials, and faqs
there, as well as perl itself for most computers.
As for books, buy "Learning Perl", and "Programming Perl", both from
O'Reilly & Associates. No matter how many other Perl books you buy along
with them, BUY THESE FIRST. You'll hear them called the "LLama book" and the
"Camel book" because of the animals on the covers.
HTH!
-grinch
----
"Of course coffee doesn't make the world go around. It
just makes it go faster." - me
Sherm Pendley
grinch@whoville.com
http://www.whoville.com
------------------------------
Date: 14 Apr 1998 01:12:23 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: looking for a good win32 perl editor.
Message-Id: <6gud5o$cil$2@comdyn.comdyn.com.au>
In article <353242A3.C8FC35D6@idt.net>,
James <jamesht@idt.net> writes:
> Hello all,
>
> I'm ready to pull my hair out.
>
> Any suggestions?
To pull your hair out? Use tweezers.. Or if you're not too sensitive
to pain, do it by the handful. Or you mean AFTER you have pulled your
hair out? You might want a wig.
Oh, you meant a perl editor? Any plain text editor will do. You might
prefer an editor that was written with programming in mind. Some I
know of: vim, emacs, pfe.
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | Advertising: The science of arresting
Commercial Dynamics Pty. Ltd. | the human intelligence long enough to
NSW, Australia | get money from it.
------------------------------
Date: 13 Apr 1998 19:58:12 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: Need to find web-based e-mail client in Perl!
Message-Id: <lu7m4t46ln.fsf@asfast.com>
abigail@fnx.com (Abigail) writes:
> Elmira Alimova (ea187@columbia.edu) wrote on MDCLXXXVI September MCMXCIII
> in <URL: news:353227C4.9329DD6B@columbia.edu>:
> ++ Hello! My school is installing web kiosks for the students. Idea is to
> ++ enable them to get mail also. If anyone knows of perl script that will
> ++ work as a web-based e-mail client,let me know. Help is greatly
> ++ appreciated.
>
>
> Why jump through extra hoops if many web browsers already have
> mail functionality build in?
I would guess that there would be many fewer kiosks than students, and
therefore many different students would be using the same installed
web browser on a given kiosk. Furthermore, I presume that students
could go from kiosk to kiosk, and they would then expect the same
functionality no matter which kiosk they happen to be using. This
would render each kiosk's web browser's configured email-related
information next to useless for any given student.
In this case, a web-based email application with user login
capabilities would be one of several desirable alternatives.
Unfortunately, I don't know offhand of such a Perl-based email
application, but I'm sure that such things exist. I did want to reply
to the comment you made, however, in case any other readers might also
have missed the "kiosk" point made by the original poster.
--
Lloyd Zusman
ljz@asfast.com
------------------------------
Date: Mon, 13 Apr 1998 21:07:23 -0400
From: "Grinch" <grinch@whoville.com>
Subject: Re: Need to find web-based e-mail client in Perl!
Message-Id: <6guc2v$jr2@fridge.shore.net>
Elmira Alimova wrote in message <353227C4.9329DD6B@columbia.edu>...
>Hello! My school is installing web kiosks for the students. Idea is to
>enable them to get mail also. If anyone knows of perl script that will
>work as a web-based e-mail client,let me know. Help is greatly
>appreciated.
>E.
I don't know of any existing scripts, but you could use the "Mail::Send" and
"Net::POP3" modules to write your own, along with your favorite CGI and
template-processing modules.
It's a bit off-topic for this ng, but if you want to implement secure email,
the PGP development kit is available from <URL: http://www.pgp.com >. You
can use that to build a plugin for the kiosk browser. PGP offers centralized
key server support now, so there's no problem there. This is a situation
where you really _can_ control the browser, so you may as well take
advantage of it.
HTH!
-grinch
----
"Of course coffee doesn't make the world go around. It
just makes it go faster." - me
Sherm Pendley
grinch@whoville.com
http://www.whoville.com
------------------------------
Date: 14 Apr 1998 01:35:15 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Need to find web-based e-mail client in Perl!
Message-Id: <6guegj$co7$1@comdyn.comdyn.com.au>
In article <lu7m4t46ln.fsf@asfast.com>,
Lloyd Zusman <ljz@asfast.com> writes:
> I would guess that there would be many fewer kiosks than students, and
> therefore many different students would be using the same installed
> web browser on a given kiosk. Furthermore, I presume that students
> could go from kiosk to kiosk, and they would then expect the same
> functionality no matter which kiosk they happen to be using. This
> would render each kiosk's web browser's configured email-related
> information next to useless for any given student.
>
> In this case, a web-based email application with user login
> capabilities would be one of several desirable alternatives.
<WARNING SUBJECT="OFFTOPIC CONTENT">
In this case, I would most likely look at an IMAP server, and
software that can talk to it (I think Eudora does, netscape 4 seems to
be able to do it, pine) Of course, you could write all this functionality
yourself, but since it's already out there, together with gui clients
and all, I don't think it's a great idea.
You can read more about IMAP at http://www.imap.org/, including a list
of software products. You'll find about 5 free of charge servers out
there, for various platforms (2 for unix, 2 for NT, and 1
Acorn/RISCOS).
> Unfortunately, I don't know offhand of such a Perl-based email
> application, but I'm sure that such things exist. I did want to reply
> to the comment you made, however, in case any other readers might also
> have missed the "kiosk" point made by the original poster.
Things like hotmail and my.yahoo seem to be using this sort of
approach, so I am sure it does exist. I don't think they would be
inclined to share their sources, but you might want to try
www.cgi-resources.com to see if there's anything free available from
there.
</WARNING>
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | If it isn't broken, it doesn't have
Commercial Dynamics Pty. Ltd. | enough features yet.
NSW, Australia |
------------------------------
Date: Tue, 14 Apr 1998 00:24:05 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Numeric validation
Message-Id: <ebohlmanErDns5.Iww@netcom.com>
Craig Berry <cberry@cinenet.net> wrote:
: ppp-support (ppp-support@canelle.telecom.uqam.ca) wrote:
: : Abigail wrote:
: : > If you don't understand the faq, how would you know the emailed
: : > suggestion does what you are looking for?
: :
: : Ok, it's so simple! The email suggestion work with my code, the results
: : is what i want, multiple testing shows everythings works fine, etc...
: : and all your answers do not.
: You see, that's the part Abigail and I don't understand. The solution
: you got in email (/^[0-9]+$/) is *identical* in behavior to one of the
: solutions provided by the faq (/^\d+$/). We're trying to figure out how
: it can be that the former works for you but the latter doesn't.
I've got a guess at to what's going on. All the solutions in the FAQ are
embedded inside calls to warn(). The emailed solution wasn't. My guess
is that the poster was able to cut-and-paste the emailed solution into his
code, but didn't know enough Perl to be able to take the FAQ solution out
of its context and use it. This is what I call the "tell me what to type"
syndrome. MHO is that a) you need to play with Perl before working with
it and b) until you've reached the point where you can recognize an
expression regardless of its context (assuming code that isn't
deliberately obfuscated), you aren't yet ready to work with Perl (or any
other programming language). I think there's a sort of epiphany in which
you suddenly go from "this *does* that" to "this *means* that," and that
it's a signal that you can now actually do something productive with the
construct in question.
------------------------------
Date: Tue, 14 Apr 1998 00:01:43 GMT
From: John Taylor-Johnston <eslcafe@callisto.si.usherb.ca>
To: sneaker@mediaone.net
Subject: Re: Perl 5.004_64 Slower???
Message-Id: <32FE5D79.6E75@callisto.si.usherb.ca>
>
> #!perl -w
> use strict;
> use diagnostics;
I assume you are using Macperl!? Right!?
It's a Mac server thing. I never liked a mac, but forced to use it.
Not much you can do. Macperl runs slower. That's all.
------------------------------
Date: Tue, 14 Apr 1998 00:15:29 GMT
From: Bill 'Sneex' Jones <sneaker@earthling.net>
Subject: Re: Perl 5.004_64 Slower???
Message-Id: <3532A917.F41D20C8@earthling.net>
John Taylor-Johnston wrote:
> >
> > #!perl -w
> > use strict;
> > use diagnostics;
>
> I assume you are using Macperl!? Right!?
> It's a Mac server thing. I never liked a mac, but forced to use it.
> Not much you can do. Macperl runs slower. That's all.
Nope. This is code was tested my RedHat Hurricane P100
System at home.
--
__________________________
Bill Jones...............|
Sneaker's Nest...........|
Chasecreek Systemhouse...|
------------------------------
Date: 14 Apr 1998 01:53:03 GMT
From: wvw@fred.net
Subject: Perl, HP-UX, and memory ...
Message-Id: <6gufhv$nnu$1@news.fred.net>
Greetings,
I'm running perl 5.04-1 on an HP-UX platform, with a script that reads in a 1.3 meg file. The script does massive
string substitutions and the virtual memory usage peaks at about 60 meg VM. I have been very careful to "my" all
variables and "undef" the rest. The problem is that near the end of the script it is necessary to do a :
system("tar -cf ...")
Even though Perl has lots of memory to work with, the OS evidently can't get enough to create a subshell and the
"system" fails.
Does anyone know how to REALLY get Perl to release memory to the kernel???
Please help,
thanks,
Warren (wvw@fred.net)
------------------------------
Date: Sun, 12 Apr 1998 11:19:10 GMT
From: Wolfgang Denk <wd@denx.muc.de>
Subject: Re: Q: I need to delete temp files after 24 hours...
Message-Id: <ErAsry.6tq.7.denx@denx.muc.de>
killbell@peterboro.net (Drake Cleary) writes:
>How do i ask the question:
>is $filename older than 24 hours?
RTFM: man perlfunc.
See especially the -M filetest function (be careful if you have long
running scripts).
Or use stat() to get the modification time by hand.
But be careful - this is the MODIFICATION time; not every OS keeps
track of creation times - UNIX for instance does not know when a file
was created.
Wolfgang
Phone: (+49)-89-95720-110 Fax: (+49)-89-95720-112 wd@denx.muc.de
Office: (+49)-89-722-27328 wd@uebemc.siemens.de
God runs electromagnetics by wave theory on Monday, Wednesday, and
Friday, and the Devil runs them by quantum theory on Tuesday, Thurs-
day, and Saturday. -- William Bragg
------------------------------
Date: Tue, 14 Apr 1998 01:47:39 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: John Callender <jbc@west.net>
Subject: Re: Relevance flames considered harmful (was Re: Q: Form CGI script...)
Message-Id: <Pine.GSO.3.96.980413180134.13639B-100000@user2.teleport.com>
On Sun, 12 Apr 1998, John Callender wrote:
> As I read the question, though, he actually *did* have a question
> (albeit a very basic one) about Perl: How do I stick a given E-mail
> address into the From: field of the message via this script?
And the Perl-relevant answer to that is "usually, you use print. If you're
not sure just what to print or where to send the output, check with the
docs, FAQs and newsgroups about the program you're using to send the
mail." That's why the questioner was sent away from c.l.perl.misc, since
he (almost certainly) weren't asking anything Perl _specific_. A newsgroup
about the mail program involved would be more able to give answers that
are more complete and (as you saw) more accurate than anything we can do
here.
If I (or anyone else) wrongly send someone looking in another newsgroup
when the question is a Perl-based one, you're right to speak up. Out of
the hundreds of times that we respond to mis-placed postings, we're sure
to make a mistake once in a long while. But it does no one a favor to
attempt to answer non-Perl questions here; an on-topic newsgroup can give
an answer both more complete and more accurate, as well as more on-topic.
Of course, if your main point is that redirecting the questioner could
have been done more politely, that's fair. We can always be a little more
polite; none of us is perfect. But, please, if anyone wishes to teach
netiquette, kindly begin by instructing newcomers (via private email) to
be sure to read the instructions in news.announce.newusers. That will help
all of us, and make every newsgroup a nicer place to be.
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 14 Apr 98 01:03:24 GMT
From: masroor <masroor@bga.com>
Subject: SNMP Support for PERL 5.0 question
Message-Id: <3532b5dc.0@feed1.realtime.net>
I need a little help to understand how the snmp module in perl 5
works.
Below is my code, question follows after that.
===============================
#!/bin/perl5.002
use SNMP_Session ;
use BER ;
use Socket ;
use strict ;
$lacation=abcd.com ;
$community=public ;
$sysDescr=snmpget($location,$community,'1.3.6.1.2.1.1.1.0');
print "$sysDescr\n";
exit ;
===============================================================
Please note the mib for sysDescr is ==> 1.3.6.1.2.1.1.1.0
Now when I run the code ,it doesn't print the $sysDescr and get a
error message on snmpget. I would very much appreciate if some one can
show me with a simple example on above oid, that how I can do a snmpget
and capture the information and print it.
Thanks
Masroor Ahmed
------------------------------
Date: Mon, 13 Apr 1998 21:35:07 -0400
From: "Grinch" <grinch@whoville.com>
Subject: Re: Username/password required w/ Netscape, Help!
Message-Id: <6gudmt$ls3@fridge.shore.net>
Aric Rosenbaum wrote in message <35323AD2.4919E3D6@arconsultinginc.com>...
>I have the web server set up to "Allow annonymous" and "Windows NT
>challenge/response". In addition, the virtual directory has execute but
>not read rights.
>
>It baffles me that IE and Netscape behave differently.
I think it's the "Windows NT challenge/response" setting, which causes the
server to attempt a WFW-type login. Since Netscape doesn't support such, it
falls back to the standard basic authentication.
I'm not an IIS guru, though, and I may be dead wrong. The IIS crowd hangs
out in "comp.infosystems.www.servers.windows"... you can probably get more
(and better) help there.
HTH!
-grinch
----
"Of course coffee doesn't make the world go around. It
just makes it go faster." - me
Sherm Pendley
grinch@whoville.com
http://www.whoville.com
------------------------------
Date: Mon, 13 Apr 1998 18:44:42 -0500
From: Michael J Schout <mschout@gkg.net>
To: Matt Taylor <nospam@rnoc.com>
Subject: Re: wc -l in perl is??????
Message-Id: <3532A36A.98F72E1@gkg.net>
Of course, if all you want is the output from wc -l, you could just do:
my $linecount = `wc -l $filename`
Of course that has the drawback of forking wc.. but its a possibility..
Mike
--
Hal 9000 - "Put down those Windows disks Dave.... Dave? DAVE!!"
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.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 2312
**************************************