[16237] in Perl-Users-Digest
Perl-Users Digest, Issue: 3649 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 13 06:05:27 2000
Date: Thu, 13 Jul 2000 03:05:14 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <963482713-v9-i3649@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 13 Jul 2000 Volume: 9 Number: 3649
Today's topics:
Re: As The Perl Turns [Was Re: ATTENTION PERL MACHOE <godzilla@stomp.stomp.tokyo>
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! <tony@pyxis.blackstar.co.uk>
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! <foo@bar.va>
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! <foo@bar.va>
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! <thunderbear@bigfoot.com>
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! <thunderbear@bigfoot.com>
Re: Beginner Question <nospam@nospam.com>
Re: Bit shifting...should be exponentiation <iltzu@sci.invalid>
Re: Bit shifting <Simon.Armstrong@nojunkmail.uk.origin-it.com>
Re: cookie problem using CGI.pm <bill.kemp@wire2.com>
Re: Crypt() authentication not working for me... <skv@iis.nsk.su>
Does fork() work on NT? <vhatz@ccf.auth.gr>
Re: Finding FatalsToEmail ? <tony@pyxis.blackstar.co.uk>
FormMail.pl across mutiple pages <andybarlow70NOanSPAM@hotmail.com.invalid>
Re: Getopt::Long gripes (Johan Vromans)
Re: hohoh:how create & do I really need? <nospam@nospam.com>
Re: HOW TO FTP A FILE IN PERL SCRIPT <nurain@singnet.com.sg>
Re: nettoyage de glossaires sous Excel... et Perl là-de <graham.wood@iona.com>
Re: New to perl, need help <nospam@nospam.com>
Re: New to perl, need help <lr@hpl.hp.com>
Re: Newbie question on die and the diamond operator <o1technospam@skyenet.nospam.net>
searching multiple sites - <muhala@my-deja.com>
Re: String length? <o1technospam@skyenet.nospam.net>
Re: Vary $" through array? <tony@pyxis.blackstar.co.uk>
WHERE TO FIND NET::FTP MODULE? <nurain@singnet.com.sg>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 13 Jul 2000 01:26:52 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: As The Perl Turns [Was Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!]
Message-Id: <396D7D4C.6538D77E@stomp.stomp.tokyo>
Elaine -HFB- Ashton wrote:
> p3rlc0dr@my-deja.com wrote:
> > Namaste, YOUNG LEE! I have been watch CNN to help talk English.
> Please to not be talking like CNN.
> Geez, what a bit of theatre yet again....same people, same behaviour.
> Maybe Pavlov should have studied geekboys to see at what point
> approaching death enlightenment occurs. I'm beginning to suspect that he
> would have observed death far more often than behavioural change.
> It's almost like a soap opera where we'll tune in tomorrow to see which
> stupid jerkoff has decided to use the same trite snide remarks to get an
> ego rush. It's bordering on the pathetic.
> Will you guys ever learn? Give it a rest.
Although well recognized and well understood symbology by a handful
of us academics, these people remind me of a mythical snake little
known by commoners, a philosophical snake serving as an appropriate
icon of humanity; a snake consuming its own tail.
Godzilla!
------------------------------
Date: Thu, 13 Jul 2000 07:37:47 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8kjrka$u7i$1@nnrp1.deja.com>
In article <8kio2a$8uf$1@orpheus.gellyfish.com>,
Jonathan Stowe <gellyfish@gellyfish.com> wrote:
>
> That is what he is saying. This is 'crowd control' - you are just
one of
> a large number of randon anonymous new posters to this group. You
have
> started out by shouting at people and calling names. People would
> rather you would go away so we can get on with answering questions
from
> people who are not being like this.
Im not calling names and Im sure you will continue to answer questions
in a MEAN WAY.
--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 13 Jul 2000 07:40:00 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8kjroe$u81$1@nnrp1.deja.com>
In article <8kio8j$9j0$1@orpheus.gellyfish.com>,
Jonathan Stowe <gellyfish@gellyfish.com> wrote:
> On Wed, 12 Jul 2000 14:29:25 GMT p3rlc0dr@my-deja.com wrote:
> > In article <396C435E.5A999DAC@bar.va>,
> > mnatoni@rumbanet.it wrote:
> >>
> >> UseNet is free: Ideas you can get here and in other newsgroups
are
> >> (use)net earnings, if no one gives an answer to your questions, you
> > have
> >> lost nothing other but few seconds of your time.
> >
> > I never asked anything from comp.lang.perl.misc except for you to
stop
> > being MEAN.
> >
>
> Aw diddums, I can think of a lot more deserving groups for your
attentions
> than this one.
THIS GROUP IS THE ONE I WANT.
>
> Anyhow its irrelevant as to whether you ever really do ask a question
as
> most of the wise readers will already have scored you down so low for
> your pathetic outburst that they will never get to read it anyhow.
I WILL NOT ASK A QUESTION SCINE I AM SCARRED OF THE MEAN.
--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 13 Jul 2000 07:50:18 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8kjsbn$ulc$1@nnrp1.deja.com>
In article <8kik6t$6b7$9@216.155.32.201>,
The WebDragon <nospam@nospam.com> wrote:
>
> stop whining like an adolescent and post more intelligently, and
you'll notice a
> marked difference in replies to your postings. :>
I had help with this one writing. NO CNN NOW. I can only say that the
response of many in this group was very mean and defensive as I had
expected. And it only goes to show how little it takes in this group
for one person to act superior and another person to be treated badly.
In fact, I am saving your messages as most of them were as angering as
the mild and benign material that seems to have angered you.
You could chosen to ignore me in the first place but you did not. You
had to make yourselves look even worse by arguing minor points and
poking fun at me. And never forget that you were MEAN on top of that.
And never forget: MATT RULER!
--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 13 Jul 2000 08:25:19 GMT
From: Tony Bowden <tony@pyxis.blackstar.co.uk>
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <P1fb5.101$254.2039@news2-win.server.ntlworld.com>
p3rlc0dr@my-deja.com wrote:
> I WILL NOT ASK A QUESTION SCINE I AM SCARRED OF THE MEAN.
I usually find that the mean just leaves bruises, but they clear up in
a few days.
The median, on the other hand, once left a long scar down my left
cheek. Try explaining *that* to the wife...
Tony
--
-----------------------------------------------------------------------------
Tony Bowden | Belfast, NI | tb@tmtm.com | www.tmtm.com | www.blackstar.co.uk
autoflagellation always helps the ghosts to hide
-----------------------------------------------------------------------------
------------------------------
Date: Thu, 13 Jul 2000 10:40:37 +0200
From: Marco Natoni <foo@bar.va>
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <396D8085.2BA1E790@bar.va>
Ganesha,
p3rlc0dr@my-deja.com wrote:
>> Unfortunately, your request is off-topic in this newsgroup... :)
> NO ITS NOT.
Yes, it was. Note that I can carry on this nursery rhyme roughly
forever... :)
> I BEEN NICE TO NOW ANSWER ME!!!!!!!!!!!!!!!!!
I am pretty sure you would congratulate me for my previous post, but
it results really unclear. Can you make me an outline?
Best regards,
Marco
------------------------------
Date: Thu, 13 Jul 2000 10:46:56 +0200
From: Marco Natoni <foo@bar.va>
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <396D8200.D9762E34@bar.va>
Ganesha,
p3rlc0dr@my-deja.com wrote:
> I AM A WOMAN. BE NICE.
Everyone can guess that reading your firmature, more misleading is
your nickname--if Ganesha is a nickname--that recalls an Hindu divinity
resembling an... elephant. ;)
Best regards,
Marco
------------------------------
Date: Thu, 13 Jul 2000 11:56:07 +0200
From: =?iso-8859-1?Q?Thorbj=F8rn?= Ravn Andersen <thunderbear@bigfoot.com>
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <396D9237.3CA3B3E@bigfoot.com>
p3rlc0dr@my-deja.com wrote:
> I never asked anything from comp.lang.perl.misc except for you to stop
> being MEAN.
>
> --
> Ganesha, p3rlc0dr and WEB MISTRESS
> Guestbooks, hit counters, shopping carts: Get Matt's Script Archive
Sorry. Turing test failed.
Next, please.
--
Thorbjørn Ravn Andersen "...plus...Tubular Bells!"
http://bigfoot.com/~thunderbear
------------------------------
Date: Thu, 13 Jul 2000 11:58:01 +0200
From: =?iso-8859-1?Q?Thorbj=F8rn?= Ravn Andersen <thunderbear@bigfoot.com>
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <396D92A8.39E77C75@bigfoot.com>
p3rlc0dr@my-deja.com wrote:
> I had help with this one writing. NO CNN NOW. I can only say that the
> response of many in this group was very mean and defensive as I had
> expected. And it only goes to show how little it takes in this group
> for one person to act superior and another person to be treated badly.
> In fact, I am saving your messages as most of them were as angering as
> the mild and benign material that seems to have angered you.
Godzilla writing for the Godzilla bot?
Interesting.
--
Thorbjørn Ravn Andersen "...plus...Tubular Bells!"
http://bigfoot.com/~thunderbear
------------------------------
Date: 13 Jul 2000 07:33:27 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Re: Beginner Question
Message-Id: <8kjrc7$qmd$0@216.155.33.87>
In article <8ki32k$dso$1@uns-a.ucl.ac.uk>, "Duncan Drury"
<d.drury@spamoffucl.ac.uk> wrote:
| I am at the very thin end of the learning of Perl. I have the book
| Learning Perl, and am trying to get a foothold, but I am a little
| stumped by hashes.
|
| It says in the book that $fred, @fred and %fred are all different,
| yet in the chapter on hashes it keeps mentioning $fred{$key} as if
| this is related to %fred.
|
| Am I right in thinking that $fred{$key} is completely different to
| $fred? I think it refers to the scalar variable referenced by $key
| in the hash %fred. Argh, but I can't tell if I am right or wrong!
(knowing that everyone else who already replied already answered your
question, I'm gonna toss out something else instead)
Just wait, it gets better :D
Wait'll you get to complex 'hashes of lists(arrays)', 'arrays(lists) of
hashes', and one that I had worked with recently -- a hash of a hash of
a hash of an array/list. =:) [I tend to think of the array/list terms as
being interchangable -- correct me if I'm wrong, oh gurus. :]
The data structure of complex HOHOHOL's is quite pretty (IMHO) :
my %complextable = (
'key1' => {
'subkeyA' => [ 'value1a', 'value2a', 'value3a', 'value4a' ],
'subkeyB' => [ 'value1b', 'value2b', 'value3b', 'value4b' ],
'subkeyC' => [ 'value1c', 'value2c', 'value3c', 'value4c' ]
},
'key2' => {
'subkeyA' => [ 'value1A', 'value2A', 'value3A', 'value4A' ],
'subkeyX' => [ 'value1x', 'value2x', 'value3x', 'value4x' ],
'subkeyY' => [ 'value1y', 'value2y', 'value3y', 'value4y' ]
}
);
de-referencing them is even more fun, but I'll let you figure that out,
as I had to (yes, the gurus here made me figger it out on my own so I'd
UNDERSTAND it (and yes it worked!)), cuz then you'll KNOW how they work.
I like intricate stuff like this, but I'm weird like that. God help the
woman who marries me. :D
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: 13 Jul 2000 07:23:09 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Bit shifting...should be exponentiation
Message-Id: <963471127.21493@itz.pp.sci.fi>
In article <8kiq2q$f8e$1@solti3.sdm.de>, Steffen Beyer wrote:
>In article <u7hpms4pedoqcnug4v68jfhd4vqb86j9oq@4ax.com>, Bart Lateur <bart.lateur@skynet.be> wrote:
>
>>> (a mod p) * (b mod p) == (a * b) mod p
>
>> Wrong. Take a=b=16, and p=256, for example.
>
>That's exactly why I said p must be a special number,
>and probably best prime. 256 is not prime. Nor is 255,
>BTW. (But 257 is prime and would do.)
Actually that's irrelevant.
>But you're right insofar as this should probably read
>
>[ (a mod p) * (b mod p) ] mod p == (a * b) mod p
Right, and it's easily proven for any given a, b and p, regardless of
primality:
Lemma 1:
Defining x % p as the smallest non-negative number which is congruent
with x modulo p, we state that:
((a%p)*(b%p)) % p == (a*b) % p
Proof:
Let n and m be integers, such that:
a == a%p + n*p;
b == b%p + m*p;
Then we can rewrite the equation as:
((a%p)*(b%p)) % p == ((a%p + n*p) * (b%p + m*p)) % p
Writing out the multiplication on the right, we get:
((a%p)*(b%p)) % p == ((a%p)*(b%p) + (a%p)*m*p + n*p*(b%p) + n*p*m*p) % p
But since (x + k*p) % p == x%p for any integer k, all but the first
term of the resulting sum can be eliminated, yielding:
((a%p)*(b%p)) % p == ((a%p)*(b%p)) % p
QED.
This has little to do with Perl anymore, though. Followups set.
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
"The screwdriver *is* the portable method." -- Abigail
Please ignore Godzilla and its pseudonyms - do not feed the troll.
------------------------------
Date: Thu, 13 Jul 2000 11:12:16 +0200
From: "Simon Armstrong" <Simon.Armstrong@nojunkmail.uk.origin-it.com>
Subject: Re: Bit shifting
Message-Id: <0E16861EE7BCD111BE9400805FE6841F11051DCB@c1s5x001.cor.srvfarm.origin-it.com>
> My guess: you must have misunderstood the algorithm from the original
> code.
Ah... the embarrassment!
You're absolutely right. I misunderstood the C. When I took a look at the
equivalent Pascal, I realised that I should be using an XOR and not
exponentiation. Comes from half knowing too many languages.
Heck guys, sorry for wasting your time, but thanks for the help anyway.
--
Simon Armstrong
(remove .nojunkmail to email)
------------------------------
Date: Thu, 13 Jul 2000 10:54:59 +0100
From: "W Kemp" <bill.kemp@wire2.com>
Subject: Re: cookie problem using CGI.pm
Message-Id: <963482244.23430.0.nnrp-13.c3ad6973@news.demon.co.uk>
Alex Sapronov wrote in message <8k4o3b$mhh$1@nnrp1.deja.com>...
>Hi guys!
>I am running CGI.pm under mod_perl. We do user menagement on our web
>site using HTTP cookies and we have been running some logging to debug
>our system. One of the things we have done is we dumped cookies using
>CGI.pm raw_cookie() call. Some entries look very wierd. For example,
>some dumps contain cookies with identical names(!).
>
>Qsession=24.64.223.5.18068951860758711030e3f60af90e0801ddb17e4bf0c6c8d4a
>7733ef; QULOGIN=030e3f60af90e0801ddb17e4bf0c6c8d4a7733ef;
>Qsession=24.64.223.5.18068951860758711bfb23498351c337887ef9accd55263d713
>fd7abd; QULOGIN=bfb23498351c337887ef9accd55263d713fd7abd
>
>The above output comes from single raw_cookie() call. Ho can that
>happen? It causes real problems :( The code runs under Apache.
>
Different names and locations make extra cookies.
They seem to have the same name, so have the cookies been set with different
paths, (or no path set, but from different directories, which will be set as
the default directory path)
------------------------------
Date: Thu, 13 Jul 2000 13:26:43 +0600
From: "Konstantin Stupnik" <skv@iis.nsk.su>
Subject: Re: Crypt() authentication not working for me...
Message-Id: <8kjnep$1li$1@nl.novosoft.ru>
Hi!
> > if (crypt($guess, $pass) eq $pass) {
> > #guess is correct
> > }
> >
> > so I have done it like the book says, BUT... why doesn't it work?
> >
>
> Just an observation, but crypt($guess, "") eq "", maybe
> you're getting a blank $pass from somewhere?
It looks like behaviour of crypy depends on OS and version of perl.
Under win32 perl5.005_03 even crypt("","") return non empty string.
But under linux perl5.004_04 crypt($guess,"") return empty string.
--
Best regards,
Konstantin.
------------------------------
Date: Thu, 13 Jul 2000 11:26:16 +0300
From: Vlasis Hatzistavrou <vhatz@ccf.auth.gr>
Subject: Does fork() work on NT?
Message-Id: <396D7D28.23739FE2@ccf.auth.gr>
Hello,
I try to write a perl program that has to launch 5 or 6 proccesses.
They don't have to communicate beteween themselves or even with the
parent program. I tried Threads but no luck NT don't have Perl threads
support from what I'm told. I resorted to fork:
unless ($pid=fork){
unless (fork) {
print "\nProgram1 started<br>\n";
open(READ,"perl Program1.pl $arg1 $arg2 $arg3 $arg4|");
while(<READ>){
$read.=$_;
}
close(READ);
print $read;
ShowResults();
exit 0;
}
exit 0;
}
waitpid($pid,0);
I even just tried
unless ($pid=fork){
unless (fork) {
print "\nProgram1 started<br>\n";
exec ("perl Program1.pl $arg1 $arg2 $arg3 $arg4");
exit 0;
}
exit 0;
}
waitpid($pid,0);
But nothing seems to work properly. After the fork the parent program
seems to continueto execute until it exits normaly, but there is no
evidence that the program1.cgi is ever executed, as if it is completely
ignored.
Does anyone know how to fork() on NT? I've been trying to do it for over
2 weeks now having tried different approaches and it's becoming really
frustrating.
I would appreciate any help.
Thanks,
--
Vlasis Hatzistavrou,
Library of Physics & Informatics
Aristotle University of Thessaloniki
------------------------------
Date: Thu, 13 Jul 2000 08:38:49 GMT
From: Tony Bowden <tony@pyxis.blackstar.co.uk>
Subject: Re: Finding FatalsToEmail ?
Message-Id: <tefb5.121$254.2039@news2-win.server.ntlworld.com>
Randal L. Schwartz <merlyn@stonehenge.com> wrote:
> Aside - the problem of being a successful and prolific columnist (some
> 102 columns so far and 2.5 more each month) is that I'm generating a
> ton of stuff that I don't own, but really should be released to the
> CPAN. At least I worked out the deal where I get to put it on my site
> at places like:
I assume the only problem here is the copyright of the actual lines of
code, rather than any more complex issues surrounding the "concept" of
the code?
Surely someone could take this code, rewrite it sufficiently to prevent
infringing copyright, give a suitable attribution, and submit it to
CPAN?
Hmmm ... how much would code have to be TMTOWTDIed to avoid copyright
infringement ....?
Tony
--
-----------------------------------------------------------------------------
Tony Bowden | Belfast, NI | tb@tmtm.com | www.tmtm.com | www.blackstar.co.uk
When we're tired we'll leave them all behind and walk away
-----------------------------------------------------------------------------
------------------------------
Date: Thu, 13 Jul 2000 02:01:12 -0700
From: Andy Barlow <andybarlow70NOanSPAM@hotmail.com.invalid>
Subject: FormMail.pl across mutiple pages
Message-Id: <2767dd60.751af5cc@usw-ex0103-086.remarq.com>
How can I make a form that is completed over 2 or possibly 3 web
pages, but still sends all the information in together.
Basically, someone completes a brief profile about themselves,
clicks on a "proceed" button, to another page and completes more
info and then presses "submit" which sends all the info to us.
We are using FormMail.pl
Thanks
-----------------------------------------------------------
Got questions? Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com
------------------------------
Date: 13 Jul 2000 09:00:24 +0200
From: JVromans@Squirrel.nl (Johan Vromans)
Subject: Re: Getopt::Long gripes
Message-Id: <wl34s5uqzuf.fsf@plume.nl.compuware.com>
Daniel,
I'm sorry to hear that your are disappointed with the way Getopt::Long
works.
> Even though Getopt::Long pretends to have GNU extensions, it works
> in a very unGNUish way.
This is quite right. Getopt::Long _has_ (not just pretends) GNU
extensions, but nowhere claims to be a 100% drop-in replacement. The
main reason for this is that Getopt::Long, and its predecessor
newgetopt.pl, existed and were used in numerous scripts before most of
the GNU extensions were added. Changing the default behaviour to be
100% GNU getopt compatible would break existing programs.
> With experimenting I've found, that the following conglomerate of
> options is necessary to give this normal behaviour:
>
> use Getopt::Long;
> Getopt::Long::config qw( bundling no_getopt_compat permute );
I did my best to make the documentation as clear as possible so I'm
sorry to hear it took you some experimenting to find out what you
need. I'll add a section to the documentation that describes how to
configure Getopt::Long to be (as much) GNU getopt compliant (as
possible).
> This still doesn't allow optional string parameters, although it
> pretends to. When an option is advertised as
>
> -o, --option=[arg]
>
> I can normally have -o or --option or -oarg or --option=arg, but not
> -o arg or --option arg. Yet Getopt::Long will just as happily eat up
> the next parameter unless it happens to be an option, making the :s
> specifier counterintuitive and useless,
Despite that I do not agree that this behaviour makes "the :s
specifier counterintuitive and useless" I'll see if I can change this.
I'll probably have to add a new config parameter for this, but then
I'll consider another config parameter to configure GNU getopt
compliancy, e.g., Getopt::Long::config qw( gnu_getopt ).
Thank you for your feedback.
-- Johan
Author and maintainer of Getopt::Long
------------------------------
Date: 13 Jul 2000 08:00:47 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Re: hohoh:how create & do I really need?
Message-Id: <8kjsvf$tsn$0@216.155.33.87>
In article <om2b5.7550$k5.94338@news1.rdc1.mb.home.com>,
andrew-johnson@home.com wrote:
| Check out the perlref and perldsc manpages for further
| examples (although none may be exactly the same as your
| example, they should help).
Also the original poster should check out perllol along with perldsc;
very useful info there that helps with understanding the whole thing.
HOHOH's are fun :)
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: Thu, 13 Jul 2000 17:47:56 +0800
From: "lova" <nurain@singnet.com.sg>
Subject: Re: HOW TO FTP A FILE IN PERL SCRIPT
Message-Id: <8kk312$j9b$1@violet.singnet.com.sg>
Where Can I get the Net::FTP module from as it is not one of the standard
Perl 5 module.
Regards
Nurain-Lova
Kiel Stirling wrote in message <396c94db$1_2@nexus.comcen.com.au>...
>
>"lova" <nurain@singnet.com.sg> wrote:
>>Hi>
>>I am currently trying to write a script to FTP some files over to another
>>machine and capture the output of the FTP command.
>>
>>How do I do this?
>>
>>Help needed urgently.
>>
>You could spend time working with a pipe to ftpd
>or search cpan.org for Net::ftp which is a perl module
>already setup to do it.
>
>>Thanks
>>
>>Regards
>>Nurain - Lova
>>
>>
>
------------------------------
Date: Thu, 13 Jul 2000 09:31:11 +0100
From: "Graham Wood" <graham.wood@iona.com>
Subject: Re: nettoyage de glossaires sous Excel... et Perl là-dedans ?
Message-Id: <8kjv38$12v$1@bvweb.iona.com>
Si j'ai bien compris, vous voulez sustituer quelques caracteres specifiques
dans 2 listes des mots. C'est possible qu'il-y a un module existant pour
lier un excel file directement de perl mais je ne le connais pas. Manquant
ce module, on peut transforme le excel file en text (csv par example) et
puis ouvre-le avec perl, transforme les chifres et remplace le csv file sans
lettres involu.
Si vous pouvez envoyer un example court du excel file avec un liste plein
des chifres que vous voulez remplacer, quelqu'un (meme moi, peut-etre)
pourai vous montrer une solution.
(mon Perl est meilleure que mon francais - je suis ecossais!)
Graham Wood
Nicolas Soccol <drich@creditlyonnais.club-internet.fr> wrote in message
news:8kioel$im5$1@front1.grolier.fr...
> Bonjour !
> je suis actuellement en stage dans une boîte de traduction / localisation
et
> ma tâche
> consiste à constituer des glossaires sous excel, associant sur 2 colonnes
un
> mot et sa traduction.
> Comme beaucoup de mini glossaires sont déjà existants sous différentes
> versions,
> il faut que je les réunisse en un seul, pour ensuite les "nettoyer" des
> caractères
> spécifiques aux programmes d'où ils sont extraits, du genre : %N, #, \n,
<>,
> et tout ce qui est chiffres, signes
> de ponctuation,doublons, lignes vides...etc (pour doublons et lignes vides
> c'est bon j'ai trouvé)
> Le truc chiant, c'est qu'Excel2000 n'est pas au top pour ce qui est
> manipulation de
> caractères : son chercher/remplacer est très limité...
> résultat, je dois me taper toute la feuille ligne par ligne pour faire un
> bon tri !!!
>
> Voilà ce que je cherche : il doit bien y avoir moyen d'automatiser un tant
> soit peu ce travail
> de fourmi, de trouver un programme en Perl qui permette de faciliter le
tri,
> quitte à exporter
> le tableau excel en .txt ou une astuce quelconque...
> Le problème est que je ne suis pas informaticien, je ne sais pas
programmer
> en Perl (ni VBasic)et je
> n'ai pas le temps d'apprendre en rentrant du boulot.....
>
> Si une bonne âme parmi vous a une solution, des conseils, ou quoi que ce
> soit qui
> puisse me venir en aide...surtout n'hésitez pas ! Merci
>
> NS
> adresse à privilégier pour toute réponse:
> soccol.n@linguex.fr
>
>
>
------------------------------
Date: 13 Jul 2000 07:13:04 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Re: New to perl, need help
Message-Id: <8kjq60$p5i$0@216.155.33.87>
In article <8kjahn$eas$1@pulp.srv.ualberta.ca>, michal@phys.ualberta.ca
wrote:
| : Indeed, but as so often, a module isn't needed to implement one line
| : of code. All it is is the familiar Orkish Maneuver.
|
| [ code skipped ... ]
|
| What about something in the following style?
|
| #!/usr/bin/perl
|
| sub fibonacci {
| my $number = shift;
| my ($x, $y) = (0, 1);
| while (1) {
interesting way of going about the loop...
| return $x if $number-- < 1;
| $x = $x + $y;
| return $y if $number-- < 1;
| $y = $x + $y;
Those could possibly be written better as $x += $y, and $y += $x, no?
| }
| }
|
| print ((fibonacci shift), "\n");
I adjusted mine to
for (1..75) {
print fibonacci($_), ", ";
print "\n" if !($_%4);
}
just to see how long it took to calculate ALL of them up to that
point...
| This technique actually easily generalizes to any sequence
| defined by a linear recursion.
True, in some respects, but it's a very algebraic or if I may, "C-ish"
solution, whereas the 'Orkish' thing Larry Rosler posted is quite
perlish :>
BOTH of them seem to be quite fast and I suspect it'd take a Benchmark
to determine which was faster. Speed isn't everything though.. how much
memory does each use, and if you equip them with larger integer lengths
(fibonacci(74)=1.30496954492866e+15 so we're already into the extended
notation, normally) to get to numbers > 75 with more precision, how fast
do things fill up ?
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: Thu, 13 Jul 2000 00:50:04 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: New to perl, need help
Message-Id: <MPG.13d7147f8700c18598abc6@nntp.hpl.hp.com>
In article <8kjp8u$n4u$0@216.155.33.87>, nospam@nospam.com says...
> In article <MPG.13d67646f3e7fb1298abc2@nntp.hpl.hp.com>, Larry Rosler
> <lr@hpl.hp.com> wrote:
>
> | Indeed, but as so often, a module isn't needed to implement one line of
> | code. All it is is the familiar Orkish Maneuver.
>
> I've heard the term used before with referral to sorting, IIRC, but I
> still don't really understand this...
Yes, the Orkish Maneuver is often used to obviate recalculation of sort
keys. The name is a pun on 'retrieve the value from the hash cache OR-
CACHE it'. Credit Joseph N. Hall for the coinage of the term, though
not the idea, I imagine.
> |
> | #!/usr/bin/perl -w
> | use strict;
> |
> | { my %fib;
> | sub fibonacci {
> | my $number = shift;
> | $fib{$number} ||= $number < 2 ? $number :
> | fibonacci($number - 1) + fibonacci($number - 2)
> | } }
>
> why doesn't %fib fall out of scope, not to mention the entire
> subroutine? is it because, as far as the compiler can tell, it's NOT out
> of scope until the calculations USING that sub are complete?
The subroutine is in the same lexical scope as the hash, so the hash
must be accessible whenever the subroutine is called. The outer braces
limit the hash's visibility, but not its lifetime, which is the same as
the lifetime of the subroutine -- the subroutine is globally accessible
as long as it is defined, regardless of block scoping.
...
> I modified it slightly to see what would happen for larger numbers, and
> it STILL is remarkably fast.. I counted a FULL minute for the previous
> script to calculate the fibonacci sequence for 26 and yet this one does
> all the way to 75 in about 1 second or so.
Isn't caching (aka memoizing, if you don't mind coining terms ad hoc)
wonderful!
...
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 13 Jul 2000 03:44:55 -0500
From: "Jim Kauzlarich" <o1technospam@skyenet.nospam.net>
Subject: Re: Newbie question on die and the diamond operator
Message-Id: <edfb5.834$ol5.1206@newsfeed.slurp.net>
"NP" <nvp@spamnothanks.speakeasy.org> wrote in message
news:A7db5.338696$VR.5087902@news5.giganews.com...
> Jim Kauzlarich <o1technospam@skyenet.nospam.net> wrote:
> : I'm trying to familliarise myself with the diamond operator. Everything
has
> : been going well, until I decided to try to add the capacity to die.
I've
> : tried various ways of isolating the die using brackets, but to tell the
>
> Why not die before you deal with <>?
I don't have a project, I'm just trying to figure out if it is possible.
So the answer to your question is either,
1) No reason.
or
2) I'm curious.
or both.
Thanks.
------------------------------
Date: Thu, 13 Jul 2000 08:52:46 GMT
From: Nitin <muhala@my-deja.com>
Subject: searching multiple sites -
Message-Id: <8kk00q$uk$1@nnrp1.deja.com>
Hi,
I'm trying to write a script that will allow a user to enter a search
term and have it searched over multiple web sites. The problem I am
running into is that some of these sites that I am searching are
password protected. I have access to the sites and I know how to deal
with sites that are using the standard web server authentication (where
the browser pops up the the userid/password challenge box). How do I
deal with sites that have set up their own authentication mechanism
(via a custom logon page) like the one at
http://www.nytimes.com/auth/login
Any input is appreciated.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 13 Jul 2000 03:14:21 -0500
From: "Jim Kauzlarich" <o1technospam@skyenet.nospam.net>
Subject: Re: String length?
Message-Id: <vMeb5.831$ol5.777@newsfeed.slurp.net>
I wanna play!
My first thought was simply:
foreach ( split (//, $string) ) {
$count++;
}
But that wasn't conviluted enough. Then, when I was almost ready to post my
creation, I Abigail was nice enough to point out Perl's goto function to me.
"Abigail" <abigail@delanet.com> wrote in message
news:slrn8mkoc1.7v7.abigail@alexandra.delanet.com...
> goto TADA
So, with a little last minute re-vamping, here is my creation: (though
without the do loop, and the extra if/then evaluation it feels un-Perl. The
little bit I know.)
#! /usr/bin/perl
use strict();
sub scalarvarlenth {
my ( $count );
$count=0;
split (//, $_[0]);
LOOP:
if ( @_[$count] ne "" ) {
$count++;
}
if ( @_[$count] eq "" ) {
goto GETOUT;
} else {
goto LOOP;
}
GETOUT:
return $count;
}
$x = scalarvarlenth ( "ree do lee" );
print "$x\n\n";
------------------------------
Date: Thu, 13 Jul 2000 08:07:18 GMT
From: Tony Bowden <tony@pyxis.blackstar.co.uk>
Subject: Re: Vary $" through array?
Message-Id: <WMeb5.70$254.2039@news2-win.server.ntlworld.com>
Bart Lateur <bart.lateur@skynet.be> wrote:
>>Is there any way of setting $" to a different value whilst it's printing
>>the array?
> No, for the simple reason that "@ary" is turned into
> join $", @ary
> automatically.
That's what I feared.
Oh well ...
Thanks,
Tony
--
-----------------------------------------------------------------------------
Tony Bowden | Belfast, NI | tb@tmtm.com | www.tmtm.com | www.blackstar.co.uk
whatever we lose(like a you or a me)it's always ourselves we find in the sea
-----------------------------------------------------------------------------
------------------------------
Date: Thu, 13 Jul 2000 17:49:08 +0800
From: "lova" <nurain@singnet.com.sg>
Subject: WHERE TO FIND NET::FTP MODULE?
Message-Id: <8kk335$j7c$1@violet.singnet.com.sg>
Where Can I get the Net::FTP module from as it is not one of the standard
Perl 5 module.
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 3649
**************************************