[18021] in Perl-Users-Digest
Perl-Users Digest, Issue: 181 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jan 31 09:05:43 2001
Date: Wed, 31 Jan 2001 06:05:18 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <980949918-v10-i181@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 31 Jan 2001 Volume: 10 Number: 181
Today's topics:
Re: <>, tie *STDIN or *ARGV <iltzu@sci.invalid>
Re: Any good Perl books? powerpenguin@my-deja.com
Re: ask help to perl a socket (Lars Gregersen)
Bijeenkomst Amsterdam Perl Mongers, Dinsdag 6 Februari (Johan Vromans)
buffering of STDIN <zfido88@zr.ru>
Re: buffering of STDIN (Rafael Garcia-Suarez)
Re: Can't use 'pop' as hash key <bart.lateur@skynet.be>
cgi: multiple file-upload <pilsl_@goldfisch.at>
Re: cgi: multiple file-upload nobull@mail.com
Cron task jean@ematic.com
Re: Cron task tigra@sky.deep.ru
Re: differences in DB_File files accross systems <tward10@jaguar.com>
Re: differences in DB_File files accross systems <bart.lateur@skynet.be>
e-mail <Waarddebon@chello.nl>
e-mail <Waarddebon@chello.nl>
Re: exists news reply grabber? [somewhat OT] (Abigail)
Re: exists news reply grabber? [somewhat OT] (Gwyn Judd)
Re: Fish v Fishing lessons - again! (Eric Bohlman)
Re: Fish v Fishing lessons - again! <godzilla@stomp.stomp.tokyo>
Re: Freelancer wanted for quickie (Bernard El-Hagin)
Re: Freelancer wanted for quickie <godzilla@stomp.stomp.tokyo>
FS: Obect-Oriented Perl setgray@my-deja.com
ftp measurement <Florian.Albrecht@alcatel.de>
Re: ftp measurement (Garry Williams)
Re: GIF Generator <w-woerlinger@ti.com>
input n chars subhakar@my-deja.com
Re: input n chars nobull@mail.com
Net::Telnet, How do i 'print' Arrow Keys? <stefan.bach@web.de>
newbie flock in windows <gagussek@cs.vu.nl>
Re: newbie flock in windows <godzilla@stomp.stomp.tokyo>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 31 Jan 2001 13:15:23 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: <>, tie *STDIN or *ARGV
Message-Id: <980945869.25752@itz.pp.sci.fi>
In article <u9k87dq62w.fsf@wcl-l.bham.ac.uk>, nobull@mail.com wrote:
>"John Lin" <johnlin@chttl.com.tw> writes:
>
>> In the following program, my intension is:
>> when @ARGV is provided, print those files in @ARGV as normal
>> otherwise...
>
>Is this a trick question? Your intension is that your code should
>alter the semantics of *ARGV only if @ARGV is empty. In that case
>then you should probably alter the semantics of *ARGV only if @ARGV is
>empty. Or am I missing some subtlties?
>
>BEGIN { tie *ARGV,'A' unless @ARGV }
Well, both you and the OP seem to be missing the possibility of @ARGV
containing "-". If, as PSI::ESP indicates, the real requirement is
that <> should never read from stdin, then that would be an issue.
One possibility I can think of would be to fork a child to do the real
work, leaving the parent to provide input to the child. (But didn't
someone mention something about this not being on Unix?..)
Hmm.. is there a reason why you can't replace every instance of "<>"
in the code with a function call? No need for tied handles then. You
could even play aliasing tricks to keep loops nice-looking:
sub input { @_ ? defined($_[0] = <>) : <> }
my @foo = input(); # my @foo = <>;
my $foo = input(); # my $foo = <>;
while (input $_) { # while (<>) {
print;
}
while (input my $bar) { # while (my $bar = <>) {
print $bar;
}
Now just rewrite the function appropriately, and you're all set.
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
"I suspect most of what I know about rat breeding *won't* be helpful,
though." -- Mary Gentle in rec.arts.sf.composition
Please ignore Godzilla and its pseudonyms - do not feed the troll.
------------------------------
Date: Wed, 31 Jan 2001 13:16:49 GMT
From: powerpenguin@my-deja.com
Subject: Re: Any good Perl books?
Message-Id: <95937r$7lo$1@nnrp1.deja.com>
In article <3A53663D.EE62DAE8@ix.netcom.com>,
feldspar@cryogen.com wrote:
> Peter Lai wrote:
> >
> > Any recommendations for good reference
> > books on Perl?
> >
> > Thanks
>
> Get thee to http://www.oreilly.com. It's practically impossible
to go
> wrong with an O'Reilly book, particularly an O'Reilly book on Perl.
>
> -jc
>
Check out http://www.nri.ca/Bookstore/Programming/Perl/index.html for
books about Perl. One of my favourites include Perl in a Nutshell.
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Wed, 31 Jan 2001 10:53:56 GMT
From: lg@kt.dtu.dk (Lars Gregersen)
Subject: Re: ask help to perl a socket
Message-Id: <3a77ee9a.1911349405@news.dtu.dk>
On Wed, 31 Jan 2001 00:49:04 +0800, "alex chen"
<alexchens@hktrade.com> wrote:
>i am writing a perl script for setting up a listen socket port for real
>time chat.
>the problem that i am facing is that, how can i send all the connecting port
>the chat message is going on?
>
>i mean which method for example. to get all the connection sockets.
> i use socket::INET modules.
I'm soory to say so, but your post doesn't make a lot of sense.
My guess is that you'll get a lot out of looking at the module
IO::Select.
Lars
M.Sc. Chem. Engng. Lars Gregersen
Dep. Chem. Engineering, DTU, Denmark
lg@kt.dtu.dk
------------------------------
Date: 30 Jan 2001 22:55:16 +0100
From: JVromans@Squirrel.nl (Johan Vromans)
Subject: Bijeenkomst Amsterdam Perl Mongers, Dinsdag 6 Februari 2001
Message-Id: <m2wvbc4se3.fsf@phoenix.squirrel.nl>
[English version follows the dutch text]
Amsterdam.pm staat voor de "Amsterdamse Perl Mongers", een groep van
gebruikers van Perl. In tegenstelling tot wat de naam suggereert is
Amsterdam.pm niet beperkt tot alleen Amsterdam, maar functioneert, tot
er meer gebruikersgroepen in Nederland zijn, als Nederlandse
gebruikersgroep.
Amsterdam.pm organiseert informele bijeenkomsten waar Perl gebruikers
kunnen samenkomen en informatie en gebruikservaringen met betrekking
tot Perl kunnen uitwisselen. Deze bijeenkomsten vinden normaliter
plaats op elke eerste dinsdag van de maand. De voertaal binnen
Amsterdam.pm is in pricipe Nederlands, maar indien nodig zal Engels
worden gebruikt, b.v. om te communiceren met niet-Nederlandssprekende
aanwezigen.
De eerstvolgende bijeenkomst vindt plaats op dinsdag 6 februari 2001 van
20:00 tot 22:00 uur op het kantoor van Dijkmat, Sarphatistraat 708,
Amsterdam. Deze bijeenkomst onder meer:
- voortgang werkgroepen
- een lezing over JAPHs
- en een heleboel Perl gezelligheid
Voor meer details, waaronder een routebeschrijving, zie
http://www.amsterdam.pm.org/Meetings/next_meeting.html
Liefhebbers van een etentje vooraf kunnen tussen 17:45 en 18:15
verzamelen bij Dijkmat. Om 18:15 (écht om 18:15!) zoeken we een
restaurantje in de buurt om een hapje te eten.
Bezoek onze Web site http://www.Amsterdam.pm.org voor meer details.
[English version]
Amsterdam.pm stands for the Amsterdam Perl Mongers. We're basically a
Perl user group. Despite its name, it is not local to the Amsterdam
environment, but it welcomes Perl mongers from all over the
Netherlands.
Amsterdam.pm organises informal meetings where Perl users can meet,
and exchange information and experiences with regard to using Perl.
The meetings are normally held every first Tuesday of the month.
Although the preferred language for communication is Dutch, English
will be spoken if necessary.
Our next meeting is Tuesday Februari 6th, from 20:00 till 22:00
at the office of Dijkmat, Sarphatistraat 708, Amsterdam. This meeting
will have:
- progress working groups
- a lecture about JAPHs
- and lots of Perl fun
See http://www.amsterdam.pm.org/Meetings/next_meeting.html for
more detail and the directions to get there.
Should you want to join some of us for dinner, please gather between
17:45 and 18:15 at Dijkmat. At 18:15 sharp we'll leave for a
restaurant somewhere nearby for dinner.
See http://www.Amsterdam.pm.org for more details.
------------------------------
Date: Wed, 31 Jan 2001 11:00:54 +0300
From: "Roman Chumakov" <zfido88@zr.ru>
Subject: buffering of STDIN
Message-Id: <958gtq$bmi$1@news.sovam.com>
Situation:
while(<STDIN>){
#process line
}
If an input line will be very-very large ...
all memory may be used up...
How can I limit input string in <STDIN>?
Thanks for any suggestions!
Roman
------------------------------
Date: Wed, 31 Jan 2001 08:28:05 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: buffering of STDIN
Message-Id: <slrn97fj5s.6g3.rgarciasuarez@rafael.kazibao.net>
Roman Chumakov wrote in comp.lang.perl.misc:
> Situation:
> while(<STDIN>){
> #process line
> }
>
> If an input line will be very-very large ...
> all memory may be used up...
>
> How can I limit input string in <STDIN>?
Are you reading a binary file ? Then use the read() function to read
fixed-length blocks of data.
--
Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
------------------------------
Date: Wed, 31 Jan 2001 12:03:20 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Can't use 'pop' as hash key
Message-Id: <7nvf7t07b5hism8jvrcn8kplba77bi9a4r@4ax.com>
oakbox@my-deja.com wrote:
>I tried to use the word 'pop' as a key in a hash, and it does not
>work. Are their reserved words that cannot be hash keys?
Sure they can. That's not your problem.
>@key_vals=(name,address,phone,pop);
Here's your problem. You're depending on perl autoquoting unrecognized
barewords. Guess what: pop is a function, and it will be executed.
This ought to work (if your perl is more recent than, say, 4.036 ;-)
@key_vals = qw(name address phone pop);
--
Bart.
------------------------------
Date: Wed, 31 Jan 2001 12:57:25 +0100
From: peter pilsl <pilsl_@goldfisch.at>
Subject: cgi: multiple file-upload
Message-Id: <MPG.14e21c0d726533149896f4@news.inode.at>
Is it possible to realize a multi-upload-field (a form-element where the
user can select more than one files for uploading) in perl ?
The CGI-Module is not capable of it and I couldnt find anything about it
in the RFC-Standards...
thanx,
peter
--
pilsl@
goldfisch.at
------------------------------
Date: 31 Jan 2001 12:20:09 +0000
From: nobull@mail.com
To: peter pilsl <pilsl_@goldfisch.at>
Subject: Re: cgi: multiple file-upload
Message-Id: <u9r91jq5fq.fsf@wcl-l.bham.ac.uk>
peter pilsl <pilsl_@goldfisch.at> spams:
> Is it possible to realize a multi-upload-field (a form-element where the
> user can select more than one files for uploading) in perl ?
Please don't spam. Not ever. Not even a little bit. Post your
question once only. Crosspost iff approriate. Never post again
immediately in another newsgroup.
Answer given in comp.lang.perl.modules.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 30 Jan 2001 16:49:58 -0000
From: jean@ematic.com
Subject: Cron task
Message-Id: <NCFVOK1M36921.7430324074@frog.nyarlatheotep.org>
Hi,
Using Telnet to connect on my remote server, I run a script by:
perl script.cgi [options]
Now, I want run "script.cgi" in a cron task, must I setup crontab with:
(for every days at 7 AM)
0 7 * * * /path/to/perl script.cgi [options]
Or must I write
0 7 * * * /path/to/script.cgi [options]
Or rename script.cgi to script, and setup the task as
0 7 * * * /path/to/script [options]
Thanks !
Jean
--Part_Boundary-718F15--
------------------------------
Date: Wed, 31 Jan 2001 13:49:26 GMT
From: tigra@sky.deep.ru
Subject: Re: Cron task
Message-Id: <959553$971$1@nnrp1.deja.com>
In article <NCFVOK1M36921.7430324074@frog.nyarlatheotep.org>,
jean@ematic.com wrote:
> Hi,
>
> Using Telnet to connect on my remote server, I run a script by:
>
> perl script.cgi [options]
>
> Now, I want run "script.cgi" in a cron task, must I setup crontab
with:
> (for every days at 7 AM)
>
> 0 7 * * * /path/to/perl script.cgi [options]
>
> Or must I write
> 0 7 * * * /path/to/script.cgi [options]
>
> Or rename script.cgi to script, and setup the task as
>
> 0 7 * * * /path/to/script [options]
You may perform following things:
$ chmod 755 /path/to/script.cgi #or whatever mode you want, concerning
security
Then add #!/path/to/perl -w... at the top of script.cgi.
So you're able to run script cgi just typing
$ /path/to/script.cgi
One thing you should keep in mind that the working directory isn't the
thing you should rely on when establishing a cron job. So your script
should chdir wherever it needs to.
BTW. the constuct /path/to/perl /path/to/script will also work (with the
same restrictions about CWD).
Another thing to be careful with is stdin. If your script awaits for
some input you'll need to feed it with some stuff. E.g.:
cat /path/to/filename | /path/to/script.cgi
Or create a wrapper:
file wrapper.sh (mode=755 or so):
=cut
cd /path/to/
cat /path/to/filename | script.cgi
=cut
Sergey
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Wed, 31 Jan 2001 10:27:37 -0000
From: "Trevor Ward" <tward10@jaguar.com>
Subject: Re: differences in DB_File files accross systems
Message-Id: <958pap$ilp1@eccws12.dearborn.ford.com>
Are so you've found the problem as well.
You cannot move DBM files from say Unix to NT or from Perl 5.04 to perl
5.05.
I still haven't found out why but the solution is to write a to flat file
utility and then a to DBM file utility to recreate them on the new server.
Unless of course somebody nows differently.
Alex Hart <news@#nospam#althepal.com> wrote in message
news:S9Nd6.559$6w3.205255@typhoon2.ba-dsg.net...
> Is the format of the DB_File output dependent on the system?
>
> I want to transfer some databases created with DB_File from one system
> to another and I can't read them on the new system. I can create new
> ones though.
>
> Have they changed the format of the output?
>
> Is there any way I can successfully transfer these files?
>
> --
>
> - Alex Hart
>
------------------------------
Date: Wed, 31 Jan 2001 11:26:02 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: differences in DB_File files accross systems
Message-Id: <cssf7tk9qgenqo8i15b0aad6fa3uclefbt@4ax.com>
Alex Hart wrote:
>Is the format of the DB_File output dependent on the system?
Likely. After all, it uses "a" version of Berkeley DB (it doesn't even
say which version) which could just as well generate a different kind of
file on different systems. After all, it makes most sense to store
numbers in native format, either big-endian or little-endian, because
that's fastest.
I'm sure there's a comparison of database file systems in the docs
somewhere, you know, NDBM vs. GDBM etc, but I just fail to find it right
now.
Oh, there it is. It's in the docs for AnyDBM_File. Hmmm... if Berkeley
DB is the same as bsd-db, then the db file should be platform
independent. In that case, it most be a Berkely DB version thing.
>I want to transfer some databases created with DB_File from one system
>to another and I can't read them on the new system. I can create new
>ones though.
You can always export ("dump") the contents of the database, and
populate a new database on the other system with it. A simple script
based on Storable could do the trick (take care of making
platform-independent strings), or you can always fall back on CSV.
--
Bart.
------------------------------
Date: Wed, 31 Jan 2001 13:30:15 GMT
From: "Waarddebon" <Waarddebon@chello.nl>
Subject: e-mail
Message-Id: <HrUd6.1047331$%C1.13488507@Flipper>
Why doesn't my e-mail subroutine work ?
My script is at hypermart (host) but when I or someone else send an
e-mail it is sended towards the returnpath instead of the
recipient.
Who can help me out with this ?
#!/usr/local/bin/perl -I/tmp
require mylib;
$|++;
use CGI;
$q=new CGI;
print "Content-type: text/html\n\n";
@ARGV = split(/\\*\&/, $ENV{'QUERY_STRING'});
$ARGV[0] =~ s/\W//g;
$ARGV[1] =~ s/\D//g;
&sendemail($veld4,"password","Your password is: $password\n");
sub sendemail {
$mailserver="/var/qmail/bin/qmail-inject";
$from = "Oostwijk";
$returnpath="dutch_man\@hotmail.com";
open( MAIL, "|$mailserver" )
|| die "can't open sendmail: $mailprog:$!\n";
print MAIL "Return-Path:$returnpath\n";
print MAIL "To: $_[0]\n";
print MAIL "Subject: $_[1]\n";
print MAIL "From: $from\n";
print MAIL "Reply-to: $from\n\n";
print MAIL " $_[2]\n\n";
close (MAIL);
}
------------------------------
Date: Wed, 31 Jan 2001 13:31:29 GMT
From: "Waarddebon" <Waarddebon@chello.nl>
Subject: e-mail
Message-Id: <RsUd6.1047348$%C1.13488716@Flipper>
Why doesn't my e-mail subroutine work ?
My script is at hypermart (host) but when I or someone else send an
e-mail it is sended towards the returnpath instead of the
recipient.
Who can help me out with this ?
#!/usr/local/bin/perl -I/tmp
require mylib;
$|++;
use CGI;
$q=new CGI;
print "Content-type: text/html\n\n";
@ARGV = split(/\\*\&/, $ENV{'QUERY_STRING'});
$ARGV[0] =~ s/\W//g;
$ARGV[1] =~ s/\D//g;
&sendemail($veld4,"password","Your password is: $password\n");
sub sendemail {
$mailserver="/var/qmail/bin/qmail-inject";
$from = "Oostwijk";
$returnpath="dutch_man\@hotmail.com";
open( MAIL, "|$mailserver" )
|| die "can't open sendmail: $mailprog:$!\n";
print MAIL "Return-Path:$returnpath\n";
print MAIL "To: $_[0]\n";
print MAIL "Subject: $_[1]\n";
print MAIL "From: $from\n";
print MAIL "Reply-to: $from\n\n";
print MAIL " $_[2]\n\n";
close (MAIL);
}
------------------------------
Date: 31 Jan 2001 08:58:54 GMT
From: abigail@foad.org (Abigail)
Subject: Re: exists news reply grabber? [somewhat OT]
Message-Id: <slrn97fkue.c6t.abigail@tsathoggua.rlyeh.net>
[ Followup-To overruled - that newsgroup isn't available on my newsserver ]
Jörg Ziefle (gt4556a@acmex.gatech.edu) wrote on MMDCCX September MCMXCIII
in <URL:news:slrn97f8bu.gfb.gt4556a@acmex.gatech.edu>:
++ Before I roll my own script:
++
++ Question:
++ =========
++ Does anybody know of a (Perl) program that checks the news (e.g. running from
++ CRON) and automatically delivers replies to one's own news articles?
I guess you could ask Kibo....
Abigail
--
perl -wleprint -eqq-@{[ -eqw\\- -eJust -eanother -ePerl -eHacker -e\\-]}-
------------------------------
Date: Wed, 31 Jan 2001 09:12:10 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: exists news reply grabber? [somewhat OT]
Message-Id: <slrn97fln9.747.tjla@thislove.dyndns.org>
I was shocked! How could Abigail <abigail@foad.org>
say such a terrible thing:
>++ Does anybody know of a (Perl) program that checks the news (e.g. running from
>++ CRON) and automatically delivers replies to one's own news articles?
>
>I guess you could ask Kibo....
Did Perl even exist when Kibo did that? (Hi Kibo *waves*)
--
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
air, n.:
A nutritious substance supplied by a bountiful Providence for the
fattening of the poor.
-- Ambrose Bierce, "The Devil's Dictionary"
------------------------------
Date: 31 Jan 2001 09:24:26 GMT
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: Re: Fish v Fishing lessons - again!
Message-Id: <958lka$6dh$6@bob.news.rcn.net>
nobull@mail.com wrote:
> Daniel Berger <djberge@uswest.com> writes:
>> > I can even tell you how to find the answer yourself.
>> > Easy, huh?
>> Then again, it's not as easy as just giving him the answer:
> If you give a man fish he won't go hungy today. If you teach a man to
> fish he'll won't go hungry until the fish stocks are exhaused. The
> Perl manuals are well-stocked rivers.
Not to mention that a surprising number of the fish given out here, by
generally well-meaning people, are rotten. The FAQs are prepared under
sanitary conditions.
------------------------------
Date: Wed, 31 Jan 2001 02:08:09 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Fish v Fishing lessons - again!
Message-Id: <3A77E409.2C70294@stomp.stomp.tokyo>
Eric Bohlman wrote:
> nobull wrote:
> > Daniel Berger wrote:
> >> > I can even tell you how to find the answer yourself.
> >> > Easy, huh?
> >> Then again, it's not as easy as just giving him the answer:
> > If you give a man fish he won't go hungy today. If you teach a man to
> > fish he'll won't go hungry until the fish stocks are exhaused. The
> > Perl manuals are well-stocked rivers.
> Not to mention that a surprising number of the fish given out here, by
> generally well-meaning people, are rotten. The FAQs are prepared under
> sanitary conditions.
Sanitary conditions are often found in infirmaries
for the mentally disabled. My experience is when
I read Perl documentation, I sense a smell of long
dead fish and sense sounds, odd clicketyclack
sounds of one-hundred monkeys.
Godzilla!
------------------------------
Date: Wed, 31 Jan 2001 08:18:16 +0000 (UTC)
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: Freelancer wanted for quickie
Message-Id: <slrn97fii4.2q0.bernard.el-hagin@gdndev25.lido-tech>
On Wed, 31 Jan 2001 08:04:06 -0000, Rhidian Jones
<webdev@ihatrading.com> wrote:
>Subject: Freelancer wanted for quickie
Please post sex adds in groups created with that purpose in mind.
Cheers,
Bernard
--
#requires 5.6.0
perl -le'* = =[[`JAPH`]=>[q[Just another Perl hacker,]]];print @ { @ = [$ ?] }'
------------------------------
Date: Wed, 31 Jan 2001 01:57:18 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Freelancer wanted for quickie
Message-Id: <3A77E17E.C53F99EC@stomp.stomp.tokyo>
Rhidian Jones wrote:
(snippage)
> We need the ability for the administrator to set a date range from the admin
> screen which will then show a screen populated with the values from the
> usual database. These will then be modified and within the specified date
> range will be displayed to public users through our serving mechanism.
> To clarify, we already have most elements. We just need the date range
> routines.
> The way I've written it makes it sound complicated, but it should be quite
> easy if you're good at manipulating dates in perl.
Complicated? Shirley you jest. Pick a year, any year.
Yes, 2001 will do just fine. There are 31557600 seconds
in total, this year and, oddly, every year. As of midnight,
Jan 31, we are 2680234.52054794520547945205479427 seconds
into this year, 2001. Remaining in this year, we have
28877365.479452054794520547945206 seconds to enjoy,
or otherwise. My preference is to enjoy my time,
86459.1780821917808219178082191781 seconds at a time,
or one day at a time, in plain English for those lost
in time, perhaps even for those who have been nowhere,
for a long time.
Extrapolate; it is simple third grade arithmetic.
Godzilla!
------------------------------
Date: Wed, 31 Jan 2001 11:59:35 GMT
From: setgray@my-deja.com
Subject: FS: Obect-Oriented Perl
Message-Id: <958un5$44l$1@nnrp1.deja.com>
For Sale: Object Oriented Perl, by Damian Conway. THE BEST book on
object-oriented programming, *regardless* of language. Check it out.
http://cgi.ebay.com/aw-cgi/eBayISAPI.dll?ViewItem&item=1209753393
Brand-new & unused. Latest edition. Do it!
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Wed, 31 Jan 2001 11:37:09 +0100
From: Florian Albrecht <Florian.Albrecht@alcatel.de>
Subject: ftp measurement
Message-Id: <3A77EAD5.C8E46B04@alcatel.de>
Hi Everybody!
I have a little problem making big trouble. I want to measure the time a
single file needs to download on the local pc. This time is also printed
after you made a ftp "get" command, e.g. "0.333 secs for 2345251 bytes"
or something like that.
First I tryed to do something with open(FTP, "|ftp 192.168.0.2"), but I
couldn't manage this. Then I used the module Net::FTP with its methods
together with a time measurement method from the perldoc. Unfortunately,
this didn't run, because the script continues while downloading, I
suppose.
Does anyone have a solution? Or a hint?
Thanks
;-) Flo
------------------------------
Date: Wed, 31 Jan 2001 13:12:51 GMT
From: garry@zvolve.com (Garry Williams)
Subject: Re: ftp measurement
Message-Id: <nbUd6.8$Sn3.1609@eagle.america.net>
On Wed, 31 Jan 2001 11:37:09 +0100, Florian Albrecht
<Florian.Albrecht@alcatel.de> wrote:
>I have a little problem making big trouble. I want to measure the time a
>single file needs to download on the local pc. This time is also printed
>after you made a ftp "get" command, e.g. "0.333 secs for 2345251 bytes"
>or something like that.
>First I tryed to do something with open(FTP, "|ftp 192.168.0.2"), but I
>couldn't manage this. Then I used the module Net::FTP with its methods
>together with a time measurement method from the perldoc. Unfortunately,
>this didn't run, because the script continues while downloading, I
>suppose.
>
>Does anyone have a solution? Or a hint?
use Net::FTP;
--
Garry Williams
------------------------------
Date: Wed, 31 Jan 2001 10:16:35 +0100
From: "wiwo" <w-woerlinger@ti.com>
Subject: Re: GIF Generator
Message-Id: <958l1d$o7o$1@tilde.csc.ti.com>
I have exactly the same problem.
I would love to use 'png' formatted graphs, but up to now I haven't found a
way to display them with Tk::Photo in a subwindow.
Any ideas or examples would be very helpful !!
Thanks,
Willi
"Martien Verbruggen" <mgjv@tradingpost.com.au> wrote in message
news:slrn97esfa.n8t.mgjv@verbruggen.comdyn.com.au...
> On Tue, 30 Jan 2001 15:59:25 GMT,
> igotlooks.com <rbfitzpa@my-deja.com> wrote:
> > Does anyone have any simple 'on-the-fly' graphics generator? I'm looking
> > for something where I could graph an array and create a gif. Any extra
> > features would be nice but anything will do for now.
>
> Two people have pointed you to the GD module. GD, in its later
> versions does NOT produce GIF, but PNG, JPEG, and some others. If you
> can find an older version of GD (1.19 or before) you can produce GIF,
> but you still owe Unisys a license fee for the use of the LZW
> algorithm.
>
> Alternatively, you can use Image::Magick to produce uncompressed GIF,
> or (after you've paid Unisys) compressed GIF when compiled with the
> lzw option.
>
> Do you really, really need GIF? PNG is far superior, and doesn't
> require any licensing fees.
>
> Martien
> --
> Martien Verbruggen |
> Interactive Media Division | "In a world without fences,
> Commercial Dynamics Pty. Ltd. | who needs Gates?"
> NSW, Australia |
------------------------------
Date: Wed, 31 Jan 2001 11:13:35 GMT
From: subhakar@my-deja.com
Subject: input n chars
Message-Id: <958s0r$2cl$1@nnrp1.deja.com>
I am writing a perl script.
I want to accept just 4 chars from the user and
this 4 chars should be availble to the program as
soon as the user finishes inputting the chars.
I DON'T want the user to press "Enter" after typing in
4 chars. they should just be availble as soon as he
finishes typing 4 chars.
Any inputs on this.
thanks,
Subhakar.
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: 31 Jan 2001 12:22:48 +0000
From: nobull@mail.com
Subject: Re: input n chars
Message-Id: <u9n1c7q5bb.fsf@wcl-l.bham.ac.uk>
subhakar@my-deja.com writes:
> I want to accept just 4 chars from the user and
> this 4 chars should be availble to the program as
> soon as the user finishes inputting the chars.
FAQ: "How can I read a single character from a file? From the
keyboard?"
Adapting the solution from "a single" to "just 4" is left as an
exercise for the reader.
Next time please read the FAQ _before_ you post.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Wed, 31 Jan 2001 14:30:06 +0100
From: "Stefan Bach" <stefan.bach@web.de>
Subject: Net::Telnet, How do i 'print' Arrow Keys?
Message-Id: <95941a$fhk96$1@ID-65368.news.dfncis.de>
Hi,
I'm connecting to a Switch via Telnet.
Unfortunately the Switch has a menu-based user interface.
How can I send ($obj->print();) Keys like the arrow Keys?
Are there ESC-Codes or how can it be done?
Thanks in advance,
Stefan
------------------------------
Date: Wed, 31 Jan 2001 10:58:37 +0100
From: Gussekloo GAM <gagussek@cs.vu.nl>
Subject: newbie flock in windows
Message-Id: <3A77E1CD.78F85CD2@cs.vu.nl>
Hi,
I'm sorry for asking a question that probably has been asked many times before, but I'm a complete newbie at PERL
and completely lost with this problem:
I'm running the OmniHTTPd webserver on my Windows 98 machine, so I can test my scripts at home before uploading. I stumbled upon a
problem with the flock() command: it doesn't seem to work under Windows...
Perhaps anyone know how I can best solve this problem? Ofcourse the optimal solution would be one that is compatible with both Unix
and Windows, but I'm not sure if this can be done.
Many many thanks in advance,
Martijn Gus
gagussek@cs.vu.nl
------------------------------
Date: Wed, 31 Jan 2001 02:40:04 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: newbie flock in windows
Message-Id: <3A77EB84.13109F33@stomp.stomp.tokyo>
Gussekloo GAM wrote:
(snippage)
> I'm running the OmniHTTPd webserver on my Windows 98 machine,
> so I can test my scripts at home before uploading. I stumbled
> upon a problem with the flock() command: it doesn't seem to
> work under Windows...
I have no direct experience with Omni. However, making
a presumption your server is loaded with Perl, look into
documentation on the fcntl () function. You can find
online documentation here:
http://language.perl.com/newdocs/pod/perlopentut.html#File_Locking
This is a module which emulates File Lock or what most
term, flock. This might work for your Win32 system. A
normal flock call is usually not supported on a Win
box, even under Apache. Perhaps fcntl will work.
Godzilla!
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 181
**************************************