[18299] in Perl-Users-Digest
Perl-Users Digest, Issue: 467 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Mar 11 21:10:37 2001
Date: Sun, 11 Mar 2001 18:10:20 -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: <984363020-v10-i467@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sun, 11 Mar 2001 Volume: 10 Number: 467
Today's topics:
Re: How do I delete (ignore) part of a string? (Tad McClellan)
Re: How do I delete (ignore) part of a string? <wuerz@yahoo.com>
Re: How do I delete (ignore) part of a string? <uri@sysarch.com>
Re: How do I delete (ignore) part of a string? <wuerz@yahoo.com>
Re: How do I delete (ignore) part of a string? <pigpen@easynews.com>
How to email an HTML page in Perl????? (Horny Me)
Re: How to email an HTML page in Perl????? <tony_curtis32@yahoo.com>
Re: How to email an HTML page in Perl????? <bart.lateur@skynet.be>
Re: How to email an HTML page in Perl????? (Gary Lefko)
Re: How to email an HTML page in Perl????? <peter.sundstrom-eds@eds.com>
Re: How to email an HTML page in Perl????? <peter.sundstrom-eds@eds.com>
Re: Importing Excel data? Robert.Groenewegen@ordina.nl
Re: Maintaining the number format and not exponential <godzilla@stomp.stomp.tokyo>
Re: Maintaining the number format and not exponential <uri@sysarch.com>
Re: Maintaining the number format and not exponential <tinamue@zedat.fu-berlin.de>
Re: Maintaining the number format and not exponential <godzilla@stomp.stomp.tokyo>
Re: Maintaining the number format and not exponential <hans-n-heather@fish.net>
Re: Maintaining the number format and not exponential <godzilla@stomp.stomp.tokyo>
Re: Maintaining the number format and not exponential <hans-n-heather@fish.net>
Re: Maintaining the number format and not exponential <uri@sysarch.com>
Re: multidimensional arrays <bart.lateur@skynet.be>
Re: newbie Q : problems with using 'use lib qw(....' to <nospamplease@thankyou.com>
Re: Perl download problem with default link <cdh@ala.net>
Perl with <form> help <ned911@home.com>
Please Help with Stock Quote Script <ptt2tennis_removespamme@yahoo.com>
this perl script's purpose <sahambi@cim.mcgill.ca>
Re: Tk based alarm clock <sun_tong_001@yahoo.com>
Re: Tripod download solved <was Perl download default l (BUCK NAKED1)
Re: Use module without installing! <peter.sundstrom-eds@eds.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 11 Mar 2001 15:46:45 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: How do I delete (ignore) part of a string?
Message-Id: <slrn9anp1l.rhi.tadmc@tadmc26.august.net>
Nancy <pigpen@easynews.com> wrote:
>Forgive me if I didn't look hard enough for the answer (approx. 2 hrs.).
That is plenty hard enough, almost for sure too hard.
Where did you go about looking and in what order? You should have
been able to find something in only a few minutes.
Perl's regular expressions would seem a good place to start:
perldoc perlre
and the pattern match operator, which uses those regexes:
perldoc perlop
>I'm working with some variables that may or may not include a price, always
>preceded by a $ dollar sign.
>
>I need to find, and delete (or ignore) the dollar sign, and anything in the
>string after it while returning the first part of the string.
^^^^^^^^
You have told us how to identify the start of the price, but you
have not said how to identify the end of the price. So we get
to make up whatever we want.
if ( $str =~ /\$(\d+)/ { # or maybe /\$(\d+\.\d\d)/ ?
my $price = $1;
# do stuff with price here
}
else {
# no price found
}
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 11 Mar 2001 23:06:02 +0100
From: Mona Wuerz <wuerz@yahoo.com>
Subject: Re: How do I delete (ignore) part of a string?
Message-Id: <110320012306029329%wuerz@yahoo.com>
In article <slrn9anp1l.rhi.tadmc@tadmc26.august.net>,
tadmc@augustmail.com (Tad McClellan) wrote:
> Nancy <pigpen@easynews.com> wrote:
> >I'm working with some variables that may or may not include a price, always
> >preceded by a $ dollar sign.
> >
> >I need to find, and delete (or ignore) the dollar sign, and anything in the
^^^^ ^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^
> >string after it while returning the first part of the string.
> ^^^^^^^^
^^^^^^^^
>
> You have told us how to identify the start of the price, but you
> have not said how to identify the end of the price. So we get
> to make up whatever we want.
Come on, while I agree that a problem should be stated clearly, I do
think you're being a bit too deliberately obtuse here. I think it's
pretty clearly stated that the OP wants to throw the price away and
keep everything before it. So this should do:
@str =~ s/^(.*?)\$.*$/$1/;
May require tweaking, but works according to the specified problem (and
according to a test string that I got to make up, of course).
-mona
------------------------------
Date: Sun, 11 Mar 2001 23:09:42 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: How do I delete (ignore) part of a string?
Message-Id: <x7lmqbc37u.fsf@home.sysarch.com>
>>>>> "MW" == Mona Wuerz <wuerz@yahoo.com> writes:
MW> @str =~ s/^(.*?)\$.*$/$1/;
MW> May require tweaking, but works according to the specified problem (and
MW> according to a test string that I got to make up, of course).
did you really try that? or did you retype it in? that will try to mung
the size of @str which makes no sense.
perl -le '@s =~ s/dd/qq/'
Can't modify array deref in substitution at -e line 1, at EOF
Execution of -e aborted due to compilation errors.
always cut and paste here. retyping code is fraught with danger.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Mon, 12 Mar 2001 00:17:24 +0100
From: Mona Wuerz <wuerz@yahoo.com>
Subject: Re: How do I delete (ignore) part of a string?
Message-Id: <120320010017247084%wuerz@yahoo.com>
In article <x7lmqbc37u.fsf@home.sysarch.com>, Uri Guttman
<uri@sysarch.com> wrote:
> >>>>> "MW" == Mona Wuerz <wuerz@yahoo.com> writes:
>
> MW> @str =~ s/^(.*?)\$.*$/$1/;
>
> did you really try that? or did you retype it in? that will try to mung
> the size of @str which makes no sense.
Yikes!
I did cut and paste, but since I tested it on $_, I, um, er..
$str =~ s/^(.*?)\$.*$/$1/;
..is what I *meant* to write.
(thanks for the correction)
-mona
------------------------------
Date: Mon, 12 Mar 2001 02:04:31 GMT
From: "Nancy" <pigpen@easynews.com>
Subject: Re: How do I delete (ignore) part of a string?
Message-Id: <O8Wq6.3587$nP3.224838@news.easynews.com>
Thanks to Thelma and Mona, both solutions
$string =~ s/^(.*?)\$.*$/$1/; # lose the price when previewing
$string =~ s/\$.+//; # lose the price when previewing
worked perfect for my needs. Thanks to Uri for for proofing : ).
Sorry Tad, didn't try yours. I should have prefaced my post with the fact
that I'm not a programmer. I am modifying a very good off-the-shelf script.
I first looked through the FAQ at
http://www.perl.com/CPAN-local/doc/manual/html/pod/perlfaq4.html mainly
focusing on Data:Strings and then through "Programming Perl" 2nd edition -
O'Reily. Sorry my OP wasn't more clear.
I usually do pretty good figuring out what I need. I occasionally have to
turn to the experts to get past blind spots and brain farts. Thanks to all
for being here for the likes of me.
------------------------------
Date: Sun, 11 Mar 2001 20:24:20 GMT
From: horny@home.com (Horny Me)
Subject: How to email an HTML page in Perl?????
Message-Id: <3aabde41.5295713@enews.newsguy.com>
I see many sites that offer a "Email this page" to a friend. Is there
a script available that sends an HTML page to a friend via Perl? My
requirement is that the page is sent as in HTML format so that the
email (itself) is an HTML page.
For example, I send myself a webpage and when I open it in my email
program it is an ACTUAL HTML page contained in the email that I can
click links or submit a form, or whatever JUST like a normal webpage.
Gary
------------------------------
Date: 11 Mar 2001 15:29:36 -0600
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: How to email an HTML page in Perl?????
Message-Id: <87bsr86lkv.fsf@limey.hpcc.uh.edu>
>> On Sun, 11 Mar 2001 20:24:20 GMT,
>> horny@home.com (Horny Me) said:
> I see many sites that offer a "Email this page" to a
> friend. Is there a script available that sends an HTML
> page to a friend via Perl? My requirement is that the
> page is sent as in HTML format so that the email
> (itself) is an HTML page.
If the email was an HTML "page" then it wouldn't be an
email. You want to encapsulate the HTML inside an email.
> For example, I send myself a webpage and when I open it
> in my email program it is an ACTUAL HTML page contained
> in the email that I can click links or submit a form, or
> whatever JUST like a normal webpage.
You can do it with the CGI and MIME::Lite modules, q.v.
The MIME::Lite documentation has an example of sending
text/html components.
Of course, how it appears to the recipient depends
entirely on which email reader they use.
hth
t
--
The avalanche has already started.
It is too late for the pebbles to vote.
------------------------------
Date: Sun, 11 Mar 2001 22:34:28 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: How to email an HTML page in Perl?????
Message-Id: <23vnatsqkkbkh57rr3fkvmbgs2ue4smmul@4ax.com>
Horny Me wrote:
>I see many sites that offer a "Email this page" to a friend. Is there
>a script available that sends an HTML page to a friend via Perl? My
>requirement is that the page is sent as in HTML format so that the
>email (itself) is an HTML page.
My ordinary answer to that question would, until now, have been the same
as the one given by Tony Curtis: build a MIME message using MIME::Lite,
and insert a section of type "text/html".
But I saw the "new modules" list on <http://use.perl.org/> just the
other day, and one of those new modules in particular looks strikingly
interesting for things like this: MIME::Lite::HTML.
<http://search.cpan.org/search?dist=MIME-Lite-HTML-1.1>
I quote:
MIME::Lite::HTML - Provide routine to transform a HTML page in a
MIME-Lite mail
It can be used by example in a HTML newsletter. You make a classic
HTML page, and give just url to MIME::Lite::HTML.
HTH,
Bart.
------------------------------
Date: Sun, 11 Mar 2001 22:32:24 GMT
From: lefkogt@codenet.net (Gary Lefko)
Subject: Re: How to email an HTML page in Perl?????
Message-Id: <3aabfcef.13150922@enews.newsguy.com>
Thanks for responding to my inquiry. I found pages onhow to use it.
How do I install it on my web server if I do not have Telnet access?
GAry
On 11 Mar 2001 15:29:36 -0600, Tony Curtis <tony_curtis32@yahoo.com>
wrote:
>>> On Sun, 11 Mar 2001 20:24:20 GMT,
>>> horny@home.com (Horny Me) said:
>
>> I see many sites that offer a "Email this page" to a
>> friend. Is there a script available that sends an HTML
>> page to a friend via Perl? My requirement is that the
>> page is sent as in HTML format so that the email
>> (itself) is an HTML page.
>
>If the email was an HTML "page" then it wouldn't be an
>email. You want to encapsulate the HTML inside an email.
>
>> For example, I send myself a webpage and when I open it
>> in my email program it is an ACTUAL HTML page contained
>> in the email that I can click links or submit a form, or
>> whatever JUST like a normal webpage.
>
>You can do it with the CGI and MIME::Lite modules, q.v.
>The MIME::Lite documentation has an example of sending
>text/html components.
>
>Of course, how it appears to the recipient depends
>entirely on which email reader they use.
>
>hth
>t
>--
>The avalanche has already started.
>It is too late for the pebbles to vote.
------------------------------
Date: Mon, 12 Mar 2001 11:36:21 +1300
From: "Peter Sundstrom" <peter.sundstrom-eds@eds.com>
Subject: Re: How to email an HTML page in Perl?????
Message-Id: <98guli$82a$1@hermes.nz.eds.com>
"Horny Me" <horny@home.com> wrote in message
news:3aabde41.5295713@enews.newsguy.com...
> I see many sites that offer a "Email this page" to a friend. Is there
> a script available that sends an HTML page to a friend via Perl? My
> requirement is that the page is sent as in HTML format so that the
> email (itself) is an HTML page.
>
> For example, I send myself a webpage and when I open it in my email
> program it is an ACTUAL HTML page contained in the email that I can
> click links or submit a form, or whatever JUST like a normal webpage.
You can grab such a script from http://cgi-resources.com/
but as you are posting this to clpm, you obviously want to know how to write
it yourself.
use MIME::Lite;
use MIME::Lite::HTML;
my $mailHTML = new MIME::Lite::HTML
From => 'MIME-Lite@alianwebserver.com',
To => 'alian@jupiter',
Subject => 'Mail in HTML with images';
$MIMEmail = $mailHTML->parse('http://www.alianwebserver.com');
$MIMEmail->send; # or for win user : $mail->send_by_smtp('smtp.fai.com');
------------------------------
Date: Mon, 12 Mar 2001 14:06:58 +1300
From: "Peter Sundstrom" <peter.sundstrom-eds@eds.com>
Subject: Re: How to email an HTML page in Perl?????
Message-Id: <98h7g0$ltc$1@hermes.nz.eds.com>
"Gary Lefko" <lefkogt@codenet.net> wrote in message
news:3aabfcef.13150922@enews.newsguy.com...
>
>
>
> On 11 Mar 2001 15:29:36 -0600, Tony Curtis <tony_curtis32@yahoo.com>
> wrote:
>
> >>> On Sun, 11 Mar 2001 20:24:20 GMT,
> >>> horny@home.com (Horny Me) said:
> >
> >> I see many sites that offer a "Email this page" to a
> >> friend. Is there a script available that sends an HTML
> >> page to a friend via Perl? My requirement is that the
> >> page is sent as in HTML format so that the email
> >> (itself) is an HTML page.
> >
> >If the email was an HTML "page" then it wouldn't be an
> >email. You want to encapsulate the HTML inside an email.
> >
> >> For example, I send myself a webpage and when I open it
> >> in my email program it is an ACTUAL HTML page contained
> >> in the email that I can click links or submit a form, or
> >> whatever JUST like a normal webpage.
> >
> >You can do it with the CGI and MIME::Lite modules, q.v.
> >The MIME::Lite documentation has an example of sending
> >text/html components.
> >
> >Of course, how it appears to the recipient depends
> >entirely on which email reader they use.
>
> Thanks for responding to my inquiry. I found pages onhow to use it.
> How do I install it on my web server if I do not have Telnet access?
> GAry
You read the FAQ or even the README file for MIME::Lite tells you how to
install it in your own directory.
perldoc -q module/library
------------------------------
Date: 11 Mar 2001 23:29:34 GMT
From: Robert.Groenewegen@ordina.nl
Subject: Re: Importing Excel data?
Message-Id: <984353374.556863@newsreader2.wirehub.nl>
This is a multipart message in MIME format.
--=_alternative 0080CB2EC1256A0C_=
Content-Type: text/plain; charset="us-ascii"
Use the win32::ole module. Simple, straight-forward and well-documented.
But it's OLE and works for M$ W9x, NT, 2000 only.
If that is no problem, I advice to follow the examples which start by
writing the spreadsheet. For some stupid reason this clarifies the stuff
very well and this is easier than reading
RG
--=_alternative 0080CB2EC1256A0C_=
Content-Type: text/html; charset="us-ascii"
<br><font size=1 face="sans-serif">Use the win32::ole module. Simple, straight-forward and well-documented. But it's OLE and works for M$ W9x, NT, 2000 only.</font>
<br>
<br><font size=1 face="sans-serif">If that is no problem, I advice to follow the examples which start by writing the spreadsheet. For some stupid reason this clarifies the stuff very well and this is easier than reading</font>
<br>
<br><font size=1 face="sans-serif">RG</font>
--=_alternative 0080CB2EC1256A0C_=--
------------------------------
Date: Sun, 11 Mar 2001 12:56:31 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Maintaining the number format and not exponential
Message-Id: <3AABE67F.A5CB71EE@stomp.stomp.tokyo>
Uri Guttman wrote:
> FORM Rookie wrote:
(snippage)
> > Now, URI suggested, "use Math::BigInt to keep it as a long integer."
> > Okay, my question is: How do you exactly do that?
> well, you start by looking at the docs for it. try typing
> perldoc Math::BigInt and reading that. it is fairly
> straightforward and easy to use. you just make simple
> object calls to do your math but the results are accurate
> to any length.
Having been afforded a gracious chance to make a fool
of yourself Uri, and I have noted you didn't express
your usual vulgarities as you are well noted for doing,
I will clue you in on a bit of reality.
When BigInt is used precisely per its documentation,
it exhibits a one-hundred percent failure rate.
Documentation for BigInt is so poorly written, so
riddled with grammar errors, contains such awkward
sentence structure, makes such extensive use of
nonsense abbreviations, its documentation is pure
geek gibberish. It is clear this author of BigInt
didn't bother to edit his documentation as it is
clear he exhibits a writing style typical of an
early high school dropout. His documentation exhibits
exceptionally sloppy work which is indicative of
equally sloppy programming work.
However, this type of piss poor documentation is quite
the norm for Perl 5 modules.
There is not a chance I would suggest use of a module
which exhibits a one-hundred percent failure rate when
used per its documentation, precisely and exactly.
Why do you do this, Uri?
perl -MMath::BigInt=:constant -e 'print 2**100'
Can't find string terminator "'" anywhere before EOF at -e line 1.
*laughs*
Godzilla!
------------------------------
Date: Sun, 11 Mar 2001 23:04:29 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Maintaining the number format and not exponential
Message-Id: <x7ofv7c3gi.fsf@home.sysarch.com>
>>>>> "G" == Godzilla! <godzilla@stomp.stomp.tokyo> writes:
G> When BigInt is used precisely per its documentation,
G> it exhibits a one-hundred percent failure rate.
no, you have a 10% failure to grasp things rate.
G> There is not a chance I would suggest use of a module
G> which exhibits a one-hundred percent failure rate when
G> used per its documentation, precisely and exactly.
G> Why do you do this, Uri?
G> perl -MMath::BigInt=:constant -e 'print 2**100'
G> Can't find string terminator "'" anywhere before EOF at -e line 1.
sysarch> perl -MMath::BigInt=:constant -e 'print 2**100'
+1267650600228229401496703205376
works for me.
you are using a pc which has different quoting issues. but you wouldn't
know that. in fact i a so surprised you even tried a -e one liner
instead of your stupid web only stuff. well, you have more to learn, such
as the issues of when perl is having a problem and your shell is. that
error is caused by your shell.
G> *laughs*
you laugh because you don't understand. we laugh because you are a idjit
who doesn't know about computers and claims to.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: 11 Mar 2001 23:52:29 GMT
From: Tina Mueller <tinamue@zedat.fu-berlin.de>
Subject: Re: Maintaining the number format and not exponential
Message-Id: <98h33t$1td9l$2@fu-berlin.de>
Godzilla! <godzilla@stomp.stomp.tokyo> wrote:
> perl -MMath::BigInt=:constant -e 'print 2**100'
> Can't find string terminator "'" anywhere before EOF at -e line 1.
00:46am tina@linux:tina 513> perl -MMath::BigInt=:constant -e 'print 2**100'
+1267650600228229401496703205376
problems with reading the documentation?
problems with your OS?
--
http://tinita.de \ enter__| |__the___ _ _ ___
tina's moviedatabase \ / _` / _ \/ _ \ '_(_-< of
search & add comments \ \ _,_\ __/\ __/_| /__/ perception
please don't email unless offtopic or followup is set. thanx
------------------------------
Date: Sun, 11 Mar 2001 16:06:21 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Maintaining the number format and not exponential
Message-Id: <3AAC12FD.9B9FF9D9@stomp.stomp.tokyo>
Uri Guttman wrote:
> > Godzilla! wrote:
> G> When BigInt is used precisely per its documentation,
> G> it exhibits a one-hundred percent failure rate.
> no, you have a 10% failure to grasp things rate.
Yes, I display a ninety percent comprehension rate.
This is darn tootin' good!
> G> perl -MMath::BigInt=:constant -e 'print 2**100'
> G> Can't find string terminator "'" anywhere before EOF at -e line 1.
> sysarch> perl -MMath::BigInt=:constant -e 'print 2**100'
> +1267650600228229401496703205376
> works for me.
> you are using a pc which has different quoting issues. but you wouldn't
> know that. in fact i a so surprised you even tried a -e one liner
> instead of your stupid web only stuff. well, you have more to learn, such
> as the issues of when perl is having a problem and your shell is. that
> error is caused by your shell.
Yes, I know. This is exceptionally annoying and a very poor
reflection on you Perl 5 Cargo Cultists; you cannot document
much of anything correctly.
You notice the author's poor grammar, doubled up words and
exceptionally poor sentence structure? This BigInt module
is right up there with the worst of module documentation,
which is ninety percent of all modules, a similar rate to
what you indicated for my successful comprehension! Ahh..
but this is a ninety percent failure rate for module
documentation. Nonetheless, I am not surprised with almost
all Perl 5 Cargo Cultists being proud, very proud graduates
of the Sears, Roebuck & Co. Academy Of Language Arts.
> > *laughs*
> you laugh because you don't understand. we laugh because you are a idjit
> who doesn't know about computers and claims to.
* laughs again *
Well, I do know this BigInt module doesn't work as the author
and you Perl 5 Cargo Cultists claim! Might work though if you
are smart enough to work past all these errors in documentation.
Ain't that about the truth for almost all Perl 5 modules?
This is precisely why I rarely suggest a module to anyone;
they are classic GIGO!!
Godzilla!
--
* Endorses LWP, Socket, Benchmark and Time Local *
------------------------------
Date: Mon, 12 Mar 2001 01:34:01 +0100
From: Heather <hans-n-heather@fish.net>
Subject: Re: Maintaining the number format and not exponential
Message-Id: <120320010134013804%hans-n-heather@fish.net>
In article <3AAC12FD.9B9FF9D9@stomp.stomp.tokyo>, "Godzilla!"
<godzilla@stomp.stomp.tokyo> wrote:
> Well, I do know this BigInt module doesn't work as the author
> and you Perl 5 Cargo Cultists claim!
I'm sorry, I don't get it. I'd like to say that I'm not after
confrontation, but I would like to understand what this is all about.
I'm looking at the Math::BigInt documentation right now, and nowhere
can I see any particular claims. In fact, the only direction as to how
the module is supposed to be used is the statement
$i = new Math::BigInt '123 456 789 123 456 789';
(Neither can I find any doubled up words, etc, but that's beside the
point.) So I'm asking in all honesty, what exactly is it that has been
claimed to work by the author, and doesn't in your experience?
Heather
------------------------------
Date: Sun, 11 Mar 2001 16:55:46 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Maintaining the number format and not exponential
Message-Id: <3AAC1E92.77C8AFA0@stomp.stomp.tokyo>
Heather wrote:
> Godzilla! wrote:
(lots of snippage)
> ...Neither can I find any doubled up words....
Well hey, if you missed those doubled up words, you certainly
are not qualified to pass along editoral commentary regarding
correct documentation techniques! Those puppies jumped up and
bit my big butt, instantly, while barking bad grammar as well!
Godzilla!
--
@ø=(a .. z);@Ø=qw(6 14 3 25 8 11 11 0 17 14 2 10 18);
$§="\n";$ß="\b";undef$©;print$§x($Ø[4]/2);
for($¡=0;$¡<=$Ø[2];$¡++){foreach$¶(@Ø){
$ø[$¶]=~tr/A-Z/a-z/;if(($¡==1)||($¡==$Ø[2]))
{$ø[$¶]=~tr/a-z/A-Z/;}print$ø[$¶];if($¶==0)
{print" ";}if($¶==$Ø[12]){print" !";}&D;}
print$ßx($Ø[4]*2);}print$§x($Ø[10]*2);
sub D{select$©,$©,$©,.25;}exit;
------------------------------
Date: Mon, 12 Mar 2001 01:58:14 +0100
From: Heather <hans-n-heather@fish.net>
Subject: Re: Maintaining the number format and not exponential
Message-Id: <120320010158141291%hans-n-heather@fish.net>
In article <3AAC1E92.77C8AFA0@stomp.stomp.tokyo>, "Godzilla!"
<godzilla@stomp.stomp.tokyo> wrote:
> you certainly
> are not qualified to pass along editoral commentary regarding
> correct documentation techniques!
It was certainly not my intention to pass along editoral commentary
regarding correct documentation techniques. I know that I'm not
qualified for that. I was asking for clarification in this specific
case, because it had me honestly confused. So, my question still
stands: what particular claim have you found to be incorrect?
Heather
------------------------------
Date: Mon, 12 Mar 2001 01:06:56 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Maintaining the number format and not exponential
Message-Id: <x7elw3bxsh.fsf@home.sysarch.com>
>>>>> "H" == Heather <hans-n-heather@fish.net> writes:
H> In article <3AAC1E92.77C8AFA0@stomp.stomp.tokyo>, "Godzilla!"
H> <godzilla@stomp.stomp.tokyo> wrote:
>> you certainly
>> are not qualified to pass along editoral commentary regarding
>> correct documentation techniques!
H> It was certainly not my intention to pass along editoral commentary
H> regarding correct documentation techniques. I know that I'm not
H> qualified for that. I was asking for clarification in this specific
H> case, because it had me honestly confused. So, my question still
H> stands: what particular claim have you found to be incorrect?
you won't get a straight answer from the resident troll. she only seeks
to annoy and confuse. she could easily quote the text she claims is poor
and then show her edits. but she is not constructive, only
derogatory. and she doesn't know how to read tehcnical documentation
anyhow. that has been proven time and time again.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Sun, 11 Mar 2001 21:00:53 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: multidimensional arrays
Message-Id: <nspnatgt34qdqv56vdd64nmja0vmbq7c67@4ax.com>
Edward Glamkowski wrote:
>I can't make the leap of logic from the "access and printing" examples
>for multidimensional arrays to what I want to do:
>
>
>@multidimarray = (
> [ 100, 149, 237, "description" ],
> [ 72, 61, 139, "description" ],
> [ 0, 191, 255, "description" ],
> [ 135, 206, 235, "description" ],
>);
>
>for $i (0 .. $#multidimarray) {
> @one_array = @multidimarray[$i];
Bzzzt!
@one_array = @{$multidimarray[$i]};
Each item in @multidimarray actually is an array reference. So you have
to dereference that.
--
Bart.
------------------------------
Date: Sun, 11 Mar 2001 15:41:59 -0500
From: "null" <nospamplease@thankyou.com>
Subject: Re: newbie Q : problems with using 'use lib qw(....' to point to modules
Message-Id: <98gnui$4o7$1@bob.news.rcn.net>
I'm still grateful for the effort.
I read up a bit more on GD.pm and I think that I understand the problem.
GD.pm is just an interface to a C library (gd, written by Boutell) that does
all of the work. GD.pm was reworked to support PNG instead of GIF after
Boutell did the same with gd. I think my problem is that, while the script
may be finding the GD.pm, it doesn't matter since my host still has the old
gd library installed...and probably doesn't have some of the other stuff
mentioned as necessary for png output in the release notes
I will just limp along with gifs for now, but thanks for trying to help me
with this,
brian
(I have this thread marked and will post the url of my project when it is,
hopefully, finished)
"Charles K. Clarkson" <c_clarkson@hotmail.com> wrote in message
news:7A2FA62CA1A2D5FB.3C127C57FBA68942.8F2131F71171236A@lp.airnews.net...
> null <nospamplease@thankyou.com> wrote:
> : Thank you again for your help
> :
> : Here's my script :
> :
> [SNIP - thanks]
>
> : If I comment out the line that tries to wire in the newer GD.pl
> : and the use Config line and uncomment the use GD line, I will
> : get a broken image icon. Then, if I also change the last two
> : lines to :
> :
> : print "Content-type: image/gif\n\n";
> : print $im->gif;
> :
> : I get a gif image a-ok.
>
> Unfortunately, my linux virtual host displays the png format
> if I uncomment the #use GD line. I don't have a CGI server
> setup on my PC, though. I assume from the binmode that you
> are running on an operating system like DOS.
> BTW, I didn't need the Config module.
>
> :
> : Thank you for the hint about the CGI::Carp line - it gives me
> : the following additional info along with the 500 error:
> :
> : Software error:
> : Can't locate object method "new" via package "GD::Image" at
> : maydaytest.pl line 17.
> :
>
> I couldn't duplicate this error. Maybe someone else has an idea
> what's going wrong.
>
> Sorry I couldn't be of more help,
> Charles K. Clarkson
>
> : Changing the path specified for the newer GD module (from the
> : path to directory containing GD.pm to the path to GD.pm itself)
> : doesn't change the result...
> :
> : Does the error message clarify things?
> :
>
>
>
------------------------------
Date: Sun, 11 Mar 2001 14:04:28 +0000
From: "cdh" <cdh@ala.net>
Subject: Re: Perl download problem with default link
Message-Id: <20010311.140425.1065311705.14567@localhost.localdomain>
In article <17202-3AABB4B4-5@storefull-248.iap.bryant.webtv.net>, "BUCK
NAKED1" <dennis100@webtv.net> wrote:
> ee it all fly by as long as it worked. :) What is "curl"? I looked it
> up, and it looks like another language. Is there a way to do this with
> the regular distributon of perl?
[OFF-TOPIC]
cURL is a command-line tool like wget that can fetch information from a
URL (various protocols). It is very feature rich in that it can handle
SSL, cookies, resumable downloads etc. It can be found at
http://curl.haxx.se.
[SEMI-ON-TOPIC]
cURL also has a perl module to interface it's library. It just a crude
wrapper for to it's C API so you'll have to read and understand that
API in order to use it.
Cheers,
Chris Hickman
------------------------------
Date: Sun, 11 Mar 2001 22:43:44 GMT
From: Ned <ned911@home.com>
Subject: Perl with <form> help
Message-Id: <3AAC004C.77045998@home.com>
I have a script that relies on the <form> command to execute properly.
It uses the following command passed to it from the <form>:
1) if ($ENV{'REQUEST_METHOD'} eq 'POST')
2) if ($contents{'job'} eq "display") {
3) if ($contents{'sort_first'} eq "sort"){
When I try and eliminate thesee commands the script does not execute. I
would like to eliminate the <form> so I can execute the script from a
Javascript menu.
Thanks,
Ned
------------------------------
Date: Sun, 11 Mar 2001 12:15:20 -0800
From: Z_amatk <ptt2tennis_removespamme@yahoo.com>
Subject: Please Help with Stock Quote Script
Message-Id: <x9yrOrP7+ng5WhJH5M6e1q0Af+W=@4ax.com>
I'm looking for a stock quote script that is similar to the one used
here:
http://www.playthings.com/index.asp?layout=front_page&webzine=playthings&publication=playthings
That is customizable so that the user can put whatever stocks he/she
is interested in and the results displayed.
I would like the results to look like the results on the above page if
possible.
Thanks for any help,
Z
------------------------------
Date: Sun, 11 Mar 2001 23:20:03 GMT
From: "Harkirat S. Sahambi," <sahambi@cim.mcgill.ca>
Subject: this perl script's purpose
Message-Id: <3AAC0822.39C8EBCF@cim.mcgill.ca>
Hello all,
I am taking course in AI, and my present project is to implement a
learning algorithm in which an agent learns the best action by repeating
a trial may times over.
To repeat the agent program, we are given a perl scirpt. I do not know
perl, but I have come to know from some of my friends that the script is
essentially running two programs and rerunning them if either of them
quits. The script is given below. The programs are "sserver" and
"start_agents". Can somebody tell me how to modify this script so that
the programs are run only N number of times, for exampel by using a
while loop and a counter or by using a for loop.
Thanks.
->HS
##################### START OF PERL SCRIPT "begin_learning"
###############
#!/opt/local/bin/perl
##########################################
# The majority of this code is used from #
# Marcel Mitran's submission on the #
# course newsgroup. Feb. 17, 1999 #
##########################################
use POSIX "sys_wait_h";
$host = "localhost";
FORK1: {
print"FORK1 -----------------------------------------------------\n";
if ($pidss = fork)
{
FORK2:
{
print"FORK2 -----------------------------------------------------\n";
if ($pidgo = fork)
{
# parent here
$t = waitpid($pidss,0);
sleep 2;
redo FORK1;
}
elsif (defined $pidgo)
{
print"Starting agents activating -----------------------------\n";
sleep 2;
#exec "start_agents $host"
exec "start_agents"
}
elsif ($! =~ /No more process/)
{
# EAGAIN, supposedly recoverable fork error
sleep 5;
redo FORK2;
}
else
{
# weird fork error
die "Can't fork: $1\n";
}
}
}
elsif (defined $pidss)
{
# child here
print"sserver --------------------------------------------------\n";
exec "sserver";
}
elsif ($! =~ /No more process/)
{
# EAGAIN, supposedly recoverable fork error
sleep 5;
redo FORK1;
}
else
{
# weird fork error
die "Can't fork: $1\n";
}
}
###################### END OF PERL SCRIPT ################
The README file that came with it:
begin_learning = this script will start up the sserver for you, as well as
start the 'start_agents' script. This also handles the fact
that when the soccermonitor window is 'quit', it will again
start the sserver and start_agents script. This allows you
to run many simulations without worrying about the 'game end'
scenario.
--
########################################################################
H. S. Sahambi
McGill Center for Intelligent Machines,
McGill University,
3480 University Street Room 410
Montreal, Quebec
Canada H3A 2A7
Email: sahambi@cim.mcgill.ca Tel: (514) 398 8282 Fax: (514) 398-7348
########################################################################
------------------------------
Date: 11 Mar 2001 16:49:49 -0400
From: * Tong * <sun_tong_001@yahoo.com>
Subject: Re: Tk based alarm clock
Message-Id: <sa8ofv8ni8i.fsf@sun_tong_001.personal.yahoo.com>
lvirden@cas.org writes:
Thanks for your detailed recommendation!
> According to * Tong * <sun_tong_001@yahoo.com>:
> :I'm planing to write a Tk based alarm clock
>
> What do you mean by 'alarm clock'? I can envision at least two meanings
> for this.
Yes, that's exactly the direction that I want to go, both of them
one at a time...
> At one time the following program was available - check to see if something
> similar to what you wanted is present...
>
> What: Remind
It's a pity that it is not there. Seems really what I am looking
for. So I spent some time trying to track it down on the web, and,
hee hee hee, I found it! It's at
http://www.roaringpenguin.com/remind.html
http://www.roaringpenguin.com/remind-03.00.22.tar.gz
So folks, if you are interested in it, update your bookmark!
cheers
--
Tong (remove underscore(s) to reply)
http://members.xoom.com/suntong001/
- All free contribution & collection & music from the heavens
------------------------------
Date: Sun, 11 Mar 2001 14:35:38 -0600 (CST)
From: dennis100@webtv.net (BUCK NAKED1)
Subject: Re: Tripod download solved <was Perl download default link problem>
Message-Id: <26365-3AABE19A-182@storefull-243.iap.bryant.webtv.net>
Thought it only fair that I post back the solution. Someone told me it
was a referer problem. Though that's not really a perl problem, there
was a perl solution.
Actually, there are 2 ways that solve downloading/uploading of Tripod
URL's without having to go to the default page first and click on the
download file.
1) Using HTTP::Headers and changing the referer like this...
$headers->referer('http://abc.com') while using the LWP::UserAgent
module allows the correct file to be grabbed. (Note: referer() should be
the same URL as the URL you are attempting to grab).
2) changing a Tripod URL such as http://bob.tripod.com/fonts.zip to
http://members.tripod.lycos.com/~bob.zip
I'll look into "cURL" later. Thanks for the info.
Regards,
Dennis
------------------------------
Date: Mon, 12 Mar 2001 11:15:25 +1300
From: "Peter Sundstrom" <peter.sundstrom-eds@eds.com>
Subject: Re: Use module without installing!
Message-Id: <98gte9$5kv$1@hermes.nz.eds.com>
"Hamed Nik" <Hamed53@btinternet.com> wrote in message
news:98defl$kih$1@neptunium.btinternet.com...
> hi, i have a question, can you please direct where i can find info about
it,
> or if you could please give me an answer.
>
> i am trying to use the Date::Calc module, but unfortunately because i am
on
> a shared server, my host wouldnt allow me to install this module for thei
> own reasons.
>
> they told me that you can use the module from your own cgi-bin directory,
> but i personally dont think that cant be done in Date::Calcs case, can you
> please tell me how to use this or any other modules without installing it
> directory to perl?
perldoc -q module/library
------------------------------
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 467
**************************************