[13774] in Perl-Users-Digest
Perl-Users Digest, Issue: 1184 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 27 22:07:26 1999
Date: Wed, 27 Oct 1999 19:07:15 -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: <941076435-v9-i1184@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 27 Oct 1999 Volume: 9 Number: 1184
Today's topics:
Re: How to pick a random item from an array? (AcCeSsDeNiEd)
Re: How to pick a random item from an array? <gellyfish@gellyfish.com>
Re: How to read from Game Port in Win32 <kbandes@home.com>
How to read/write from unamed pipe? wilsondiep@my-deja.com
Re: How to round a number? <cassell@mail.cor.epa.gov>
Re: How to round a number? <AgitatorsBand@yahoo.com>
Re: How to round a number? <lr@hpl.hp.com>
Re: How to round a number? <rootbeer@redcat.com>
Re: How to round a number? <skilchen@swissonline.ch>
Re: How to round a number? <AgitatorsBand@yahoo.com>
Re: How to round a number? <skilchen@swissonline.ch>
How to send an HTML-fromatted text file as an fax? <change on install>" <my@home.net>
Re: How to send an HTML-fromatted text file as an fax? <butterfingers1@my-deja.com>
How to strip non-printing characters. <jongl@proaxis.com>
Re: How to strip non-printing characters. (Eric Bohlman)
Re: How to strip non-printing characters. <lr@hpl.hp.com>
How to Trap DBI Errors (Jeff Givens)
Re: How to Trap DBI Errors <newsposter@cthulhu.demon.nl>
Re: How to Trap DBI Errors (Jeff Givens)
Re: How to Trap DBI Errors <newsposter@cthulhu.demon.nl>
Re: HOWTO convert year/week date 1999/43 to 24.10.1999? <aqumsieh@matrox.com>
Re: HOWTO convert year/week date 1999/43 to 24.10.1999? <cassell@mail.cor.epa.gov>
Re: HOWTO convert year/week date 1999/43 to 24.10.1999? dabbu_2000@my-deja.com
Re: HOWTO convert year/week date 1999/43 to 24.10.1999? <sb@sdm.de>
Re: HOWTO convert year/week date 1999/43 to 24.10.1999? dabbu_2000@my-deja.com
Re: HOWTO convert year/week date 1999/43 to 24.10.1999? <AgitatorsBand@yahoo.com>
HTML Table to Array? <hmarq@interaccess.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 25 Oct 1999 10:25:16 GMT
From: dillon_rm@magix.com.sg (AcCeSsDeNiEd)
Subject: Re: How to pick a random item from an array?
Message-Id: <38142c85.2672879@news.magix.com.sg>
You're off topic and wasting bandwidth.
This is a perl ng and not some English ng.
Does it matter if I used the wrong word?
Unless you think like a computer, you definitely have the "AI" to know
what I'm talking about when I used the word "code" although wrong in
your sense.
If you need to flame someone, take it out on alt.flame or some other
ng that's accepts your kind of shit.
On 24 Oct 1999 21:37:50 -0000, Jonathan Stowe
<gellyfish@gellyfish.com> wrote:
>On Sun, 24 Oct 1999 13:24:44 GMT AcCeSsDeNiEd wrote:
>>
>> a code
>>
>
>What does this mean ? This reeks of script kiddie of k3wl t0k of all
>those things that make *this programmer* want to go out an start tending
>sheep ...
>
>You have *some code* or you have *a program* - *a code* will generally have
>nothing to do with computer programming in any particular sense.
>
>/J\
>--
>Jonathan Stowe <jns@gellyfish.com>
><http://www.gellyfish.com>
>Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
To e-mail me, remove "_rm"
------------------------------
Date: 25 Oct 1999 11:48:13 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How to pick a random item from an array?
Message-Id: <3814356d_1@newsread3.dircon.co.uk>
AcCeSsDeNiEd <dillon_rm@magix.com.sg> wrote:
>
> If you need to flame someone, take it out on alt.flame or some other
> ng that's accepts your kind of shit.
>
And I thought I had already killfiled you ... Oh well easily remedied.
/J\
--
"We've even been asked to review a luxury hotel. I can't think why" -
Neil Hamilton
------------------------------
Date: Tue, 26 Oct 1999 03:38:34 GMT
From: Kenneth Bandes <kbandes@home.com>
Subject: Re: How to read from Game Port in Win32
Message-Id: <381522A4.8787CB6D@home.com>
"Harlan Carvey, CISSP" wrote:
> You want the Win32::SerialPort module
> dawgeatdawg@my-deja.com wrote:
> > Hope this is the right place for a rookie question: Can someone show me
> > code that reads from the game port or joystick with Activeperl?
Offhand, I don't know the answer, but this isn't it - the game port is
not a serial port and Win32::SerialPort does not mention game port
support in its documentation.
Ken Bandes
------------------------------
Date: Mon, 25 Oct 1999 21:59:44 GMT
From: wilsondiep@my-deja.com
Subject: How to read/write from unamed pipe?
Message-Id: <7v2jsd$qb6$1@nnrp1.deja.com>
I have this probelm that seems to work with unix were I can treat a
unnamed pipe as a file for example in unix I write
open(NPOUT, "+>>//./pipe/ax")
and this would allow me to write to it and the read the response from
the pipe. But it will not work on windows. Is there a way i can do
this in windows?
I tried using open2 but I have one pipe for reading and writing and
doesnt seem to work for windows.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 26 Oct 1999 16:37:56 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: How to round a number?
Message-Id: <38163B54.E2A5590F@mail.cor.epa.gov>
Scratchie wrote:
>
> Larry Rosler <lr@hpl.hp.com> wrote:
> : IIRC, that is the default IEEE Floating-Point Standard rounding
> : behavior. Rounding up introduces a statistical bias.
>
> Interesting... it's just too bad that the documentation wasn't (until
> *very* recently) more explicit on this subject. Similar to the situation
> with localtime a couple/few years ago where the documentation just said
> "the values come out of time_t" or some such and left it at that.
Well, as TomC says, "patches are welcome." And as you can see,
patches are even incorporated.. which is more than can be said
for some languages with *paid* support staff. :-)
> Slightly
> less than ideal, and it makes me wonder how many e-commerce sites out
> there are undercharging for sales tax occasionally.
Not enough of them. :-)
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 26 Oct 1999 14:54:29 GMT
From: Scratchie <AgitatorsBand@yahoo.com>
Subject: Re: How to round a number?
Message-Id: <FgjR3.1551$LR3.272578@news.shore.net>
Larry Rosler <lr@hpl.hp.com> wrote:
: IIRC, that is the default IEEE Floating-Point Standard rounding
: behavior. Rounding up introduces a statistical bias.
Interesting... it's just too bad that the documentation wasn't (until
*very* recently) more explicit on this subject. Similar to the situation
with localtime a couple/few years ago where the documentation just said
"the values come out of time_t" or some such and left it at that. Slightly
less than ideal, and it makes me wonder how many e-commerce sites out
there are undercharging for sales tax occasionally.
--Art
--
--------------------------------------------------------------------------
National Ska & Reggae Calendar
http://www.agitators.com/calendar/
--------------------------------------------------------------------------
------------------------------
Date: Mon, 25 Oct 1999 15:08:10 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: How to round a number?
Message-Id: <MPG.127e74a7aad92e9998a124@nntp.hpl.hp.com>
In article <Oq3R3.1460$LR3.253904@news.shore.net> on Mon, 25 Oct 1999
20:53:02 GMT, Scratchie <AgitatorsBand@yahoo.com> says...
> Samuel Kilchenmann <skilchen@swissonline.ch> wrote:
> : For the example, see my other posting today. Unfortunately nobody has given
> : any feedback about the results on their systems so far.
>
> I tried it on two (more or less random) Unix machines and got the same
> results as you... sprintf rounds to even on 5 rather than rounding up.
>
> BOO!
IIRC, that is the default IEEE Floating-Point Standard rounding
behavior. Rounding up introduces a statistical bias.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 25 Oct 1999 12:33:42 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: How to round a number?
Message-Id: <Pine.GSO.4.10.9910251232480.29843-100000@user2.teleport.com>
On Fri, 22 Oct 1999, Samuel Kilchenmann wrote:
> > If you don't like what's available, write your own. But perl's printf
> > is not the system's printf, so it should be the same everywhere.
> >
> But it isn't. From perldoc -f sprintf:
> Perl does its own `sprintf()' formatting -- it emulates
> the C function `sprintf()', but it doesn't use it
> (except for floating-point numbers, and even then only
> the standard modifiers are allowed).
>
> The rounding behavior of Perl's (s)printf is effectively platform
> dependent, at least on the systems i have access to. On Linux and on
> NCR's MP-RAS i get "round half to even" and on Win32 i get "round half
> up" as shown in the examples above.
You should cook up a short example program which shows the unreliable
behavior you claim, then use perlbug to file a bug report. Thanks!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Mon, 25 Oct 1999 20:47:31 GMT
From: "Samuel Kilchenmann" <skilchen@swissonline.ch>
Subject: Re: How to round a number?
Message-Id: <Dl3R3.26550$m4.96141989@news.magma.ca>
Tom Phoenix schrieb in Nachricht ...
>On Fri, 22 Oct 1999, Samuel Kilchenmann wrote:
>>
>> The rounding behavior of Perl's (s)printf is effectively platform
>> dependent, at least on the systems i have access to. On Linux and on
>> NCR's MP-RAS i get "round half to even" and on Win32 i get "round half
>> up" as shown in the examples above.
>
>You should cook up a short example program which shows the unreliable
>behavior you claim, then use perlbug to file a bug report. Thanks!
>
For the example, see my other posting today. Unfortunately nobody has given
any feedback about the results on their systems so far.
But i don't consider it being a bug. It is simply an undocumented system
dependency i don't like (and as Abigail pointed out, the behavior is the
same in other languages which use (s)printf, e.g. C, Python's % operator,
Tcl's format statement. The difference to Perl is that C doesn't claim to
have a round function, and Python and Tcl have one).
I am simply trying to advocate for a round() function as a Perl builtin. My
preference regarding the rounding behavior is "round half away from zero" on
all platforms (as implemented in the example in perlxstut.pod).
------------------------------
Date: Mon, 25 Oct 1999 20:53:02 GMT
From: Scratchie <AgitatorsBand@yahoo.com>
Subject: Re: How to round a number?
Message-Id: <Oq3R3.1460$LR3.253904@news.shore.net>
Samuel Kilchenmann <skilchen@swissonline.ch> wrote:
: For the example, see my other posting today. Unfortunately nobody has given
: any feedback about the results on their systems so far.
I tried it on two (more or less random) Unix machines and got the same
results as you... sprintf rounds to even on 5 rather than rounding up.
BOO!
--Art
--
--------------------------------------------------------------------------
National Ska & Reggae Calendar
http://www.agitators.com/calendar/
--------------------------------------------------------------------------
------------------------------
Date: Mon, 25 Oct 1999 10:14:59 GMT
From: "Samuel Kilchenmann" <skilchen@swissonline.ch>
Subject: Re: How to round a number?
Message-Id: <D4WQ3.26290$m4.95816102@news.magma.ca>
Abigail <abigail@delanet.com> wrote in message
news:slrn81822l.fji.abigail@alexandra.delanet.com...
> Samuel Kilchenmann (skilchen@swissonline.ch) wrote on MMCCXLVI
> MCMXCIII in <URL:news:5nPQ3.26281$m4.95656863@news.magma.ca>:
> ## Abigail <abigail@delanet.com> wrote in message
> ## news:slrn81664c.fji.abigail@alexandra.delanet.com...
> ## > Francois Dupradeau (fyd@u-picardie.fr) wrote on MMCCXLIII
> ## > MCMXCIII in <URL:news:3810B735.41C6@u-picardie.fr>:
> ## > __
> ## > __ Is there a function in Perl to round off the 2nd or the
> ## > __ thrird (or the 5th, etc...) number after the decimal point
> ## > __ of a number?
> ## >
> ## Its in the FFAQ where you find the answer that Perl has no round
> ## function and that you could use (s)printf instead.
>
> Indeed. So, what's the problem? That it isn't called "round"?
No, the problem is that (s)printf does not round, but format a
floating-point number into a decimal string with a fixed precision.
And it does the rounding involved in this formatting/conversion
process with an undocumented and system dependent rounding mode.
> That's
> similar to claiming that Perl doesn't have a "move" function, as
> you have to use "rename" instead.
>
No, its more like asking why Perl has an int() function but no round()
function.
> ## To ask the question once more: why is there no round function in
> ## Perl with the same behavior on all platforms?
>
> That's a different question than the one I answered. The advantage
> of using the system supplied rounding behaviour is that your
> programs behave the same as other programs on the same platform that
> use the system supplied behaviour.
>
Maybe, but it would be nice to find some specification of the rounding
behavior in the documentation.
No other language i know recommends to use of (s)printf to round
numbers. And although the "round half to even" may be the appropriate
rounding behavior in many instances, it probably is not the right
thing to do in conversions of numbers to strings and in output
operations. At least for many of the Perl programmers (s)printf's
behavior on *nixish systems is probably a surprise. The fact that even
people like TomC give completely wrong descriptions about what
(s)printf does is another surprise.
> If you want a specific rounding behaviour (which one should Perl
> have picked?), write your own.
>
As usual: it should pick the rounding behavior most people expect, and
which is already (but wrongly) announced in some documentation, i.e.
"round half away from zero". The simplest way would be to promote the
example in perlxstut.pod to a Perl builtin.
Why should everybody write an own private round()? Rounding is not
such an unusual task that you wouldn't gain something if it was a
builtin operation.
------------------------------
Date: Wed, 27 Oct 1999 10:52:40 +0200
From: "<change on install>" <my@home.net>
Subject: How to send an HTML-fromatted text file as an fax?
Message-Id: <7v6ec0$28qu$1@buty.wanadoo.nl>
Hi,
I want to send HTML-formatted text to an receivers fax-machine. Is there a
way to do this? Most of my programs are written in Perl, so I would like to
use Perl for this aswell.
Thanks,
Marten
------------------------------
Date: Wed, 27 Oct 1999 13:05:31 GMT
From: Graham W. Boyes <butterfingers1@my-deja.com>
Subject: Re: How to send an HTML-fromatted text file as an fax?
Message-Id: <7v6tap$rq9$1@nnrp1.deja.com>
Let's see...there IS a way...but I forget how...
Hm..try a company called Fax4Free.com. They can fax to almost anywhere
in Canada or the U.S. I think it needs to be called with a form.
Explanations of the lines are below. This is not a Perl script. It can
be called from ordinary HTML, but may be easily called from any Perl
script.
<FORM method="POST" action="http://www.fax4free.com/WebFaxResp.asp">
That line is important. Do not change it.
<INPUT type="HIDDEN" name="weburl" value="The Address To Send">
Ex. "http://www.toao.net". (Without the quotes)
<INPUT type="HIDDEN" name="BackText" value="Back to wherever">
The name of the file you called this form from.
<INPUT type="HIDDEN" name="BackURL" value="$AccessName">
The address of the file you called this form from. Just so they can
say, "It's been faxed. Go back to where you came from...", etc.
<input type="HIDDEN" name="Subject" value="Subject of whatever.">
The subject. Duh.
<INPUT type="SUBMIT" value="Fax this to a friend for free!">
Self-explanitory.
<INPUT type="TEXT" name="Fname" size=20>
Your first name
<INPUT type="TEXT" name="Lname" size=20>
Your last name
<INPUT type="TEXT" name="email" size=20>
Your e-mail
<INPUT type="TEXT" name="notes" size=20>
Notes you may wish to send. OR, use this code.
<TEXTAREA name="notes" rows="number of rows" cols="number of
cols"></TEXTAREA>
This has the same result, but it is multi-line.
<INPUT type="TEXT" name="recep" size=20>
Recipient's name
<input type="TEXT" name="area_code" size="4" maxlength="3">
Their area code
<input type="TEXT" name="number" size="9" maxlength="8">
Their Fax number
</FORM>
Any of the "hidden" fields may be public, and vice versa. I use this
when I want to send a certain recipe or joke by fax from my page, so I
send the "subject" as the recipe or joke title and have the "subject"
hidden, but you may want to make it public, depending on what you want
to fax.
Good luck,
Graham W. Boyes
Oh yes, did I mention that most graphics and background files *won't* be
sent? Sometimes special font colours, etc, won't be sent also. Sending
forms stinks. But it is still very useful...I'm not trying to put it
down or anything.
There will be two lines of advertising on either side of the fax. They
are about half an inch wide each.
> Hi,
>
> I want to send HTML-formatted text to an receivers fax-machine. Is
there a
> way to do this? Most of my programs are written in Perl, so I would
like to
> use Perl for this aswell.
>
> Thanks,
> Marten
>
>
--
"The One and Only"
me AT toao DOT net ~ http://www.toao.net
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 26 Oct 1999 02:07:57 -0700
From: "Illiterate" <jongl@proaxis.com>
Subject: How to strip non-printing characters.
Message-Id: <s1arv3jtgbb40@corp.supernews.com>
Is there a better way to strip non-printing characters from a string?
I've ended up using something like
$string =~ /[^\w\s~!@#\$%^&*()_+`\-={}|[\]\\:";'<>?,.\/]//g;
However, this looks ugly and I assume there is better way to do this.
Another question, this one just because I'm curious, how would I do it for
non-English languages?
Thanks.
Illiterate
------------------------------
Date: 26 Oct 1999 21:13:25 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: How to strip non-printing characters.
Message-Id: <7v55hl$q6$2@nntp1.atl.mindspring.net>
Larry Rosler (lr@hpl.hp.com) wrote:
: None of the attempts above takes into account that there are many
: characters with graphic representations in the upper half of the ASCII
^^^^^^^^^^^^^^^^^^^^^^^
: code set. However, depending on the locale, \w may be adjusted to
^^^^^^^^
You mean like all the upper- and lower-case Roman letters? ASCII *is* a
7-bit code, ya know?
------------------------------
Date: Tue, 26 Oct 1999 10:10:34 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: How to strip non-printing characters.
Message-Id: <MPG.127f8063ce34bfd698a12e@nntp.hpl.hp.com>
In article <s1arv3jtgbb40@corp.supernews.com> on Tue, 26 Oct 1999
02:07:57 -0700, Illiterate <jongl@proaxis.com> says...
> Is there a better way to strip non-printing characters from a string?
> I've ended up using something like
>
> $string =~ /[^\w\s~!@#\$%^&*()_+`\-={}|[\]\\:";'<>?,.\/]//g;
>
> However, this looks ugly and I assume there is better way to do this.
The C Standard definition of isprint() can be rendered in Perl simply
as:
$string =~ tr/ -~//cd;
or (more explicitly)
$string =~ tr/\x20-\x7E//cd;
Your example is closer to isprint() || isspace(), because of the '\s' in
the character class.
$string =~ tr/\t\n\r\f -~//cd;
> Another question, this one just because I'm curious, how would I do it for
> non-English languages?
None of the attempts above takes into account that there are many
characters with graphic representations in the upper half of the ASCII
code set. However, depending on the locale, \w may be adjusted to
include those characters. But that doesn't work in tr///.
See `perldoc perllocale`.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 26 Oct 1999 18:23:08 GMT
From: jgivensXX@adelphiaXX.netXX (Jeff Givens)
Subject: How to Trap DBI Errors
Message-Id: <3815f062.21559051@nntp>
I'm just setting out in learning perl and DBI::ODBC into an Access
database.
Things are going reasonably well but one problem I have is when an error
occurs in either the prepare or execute dbi calls. I know the reason why -
a date field is explicitly defined in Access and an input not conforming
will cause the error. I know - parse it, but that's not the point here. How
can I trap an error? From Netscape the user see the usual "The document
contained no data..." message.
This running on 98 BTW via CGI.
[...]
#Call DBI to connect to the database
$dbh = DBI->connect('dbi:ODBC:Engineering Upload', '', '', { RaiseError =>
1 });
#Prepare it for the command
$cursor = $dbh->prepare($SQLCommand);
#execute the command
$cursor->execute;
[...]
I really don't have a feel for the above - how can I use RaiseError, if at
all?
When the error happens the script seems to abort as no html output is
produced.
_________________________________________________________________
JG... Jeff Givens
mailto:jgivensXX@adelphiaXX.netXX
"My hovercraft is full of eels."
------------------------------
Date: 27 Oct 1999 16:44:13 GMT
From: Erik van Roode <newsposter@cthulhu.demon.nl>
Subject: Re: How to Trap DBI Errors
Message-Id: <7v7a4t$6eo$1@internal-news.uu.net>
Jeff Givens <jgivensXX@adelphiaxx.netxx> wrote:
> I gather there is a DIE routine somewhere. Can I code in there or is it off
> limits?
Off limits.
> How about setting raiseerror to zero, can I then make an error call
> after every dbi function, something like:
Yes, you can set RaiseError to 0:
my $dbh = DBI->connect($db, $db_user, $db_passwd, {
RaiseError => 0,
AutoCommit => 0,
PrintError => 0,
});
> I don't know how to make use of the || die () references I've seen.
You mean you don't understand what it means? You should check the
return codes of your prepare/execute/fetch/etc. calls.
$sth->execute (@values) || print $dbh->errstr;
This is just a convenient short way. Perl has many ways to
write things. You could use an if statement, but you really should
learn how to use the || and && (even if you don't want to use them,
you'll see them frequently).
if (! $sth->execute (@values)) {
print $dbh->errstr;
}
Erik
------------------------------
Date: Tue, 26 Oct 1999 19:30:44 GMT
From: jgivensXX@adelphiaXX.netXX (Jeff Givens)
Subject: Re: How to Trap DBI Errors
Message-Id: <3815f9eb.24000162@nntp>
On 26 Oct 1999 18:32:52 GMT Erik van Roode <newsposter@cthulhu.demon.nl>
wrote:
>See the DBI documentation on how to connect to database. Pay special
>attention to RaiseError/PrintError.
I've looked and from what I've seen can not deduce quite what to do.
I gather there is a DIE routine somewhere. Can I code in there or is it off
limits? How about setting raiseerror to zero, can I then make an error call
after every dbi function, something like:
$result = $handle->errstr();
I don't know how to make use of the || die () references I've seen.
_________________________________________________________________
JG... Jeff Givens
mailto:jgivensXX@adelphiaXX.netXX
"My hovercraft is full of eels."
------------------------------
Date: 26 Oct 1999 18:32:52 GMT
From: Erik van Roode <newsposter@cthulhu.demon.nl>
Subject: Re: How to Trap DBI Errors
Message-Id: <7v4s4k$kb1$2@internal-news.uu.net>
Jeff Givens <jgivensXX@adelphiaxx.netxx> wrote:
> I'm just setting out in learning perl and DBI::ODBC into an Access
> database.
> Things are going reasonably well but one problem I have is when an error
> occurs in either the prepare or execute dbi calls.
[snip]
> How can I trap an error?
See the DBI documentation on how to connect to database. Pay special
attention to RaiseError/PrintError.
Erik
------------------------------
Date: Wed, 27 Oct 1999 11:12:37 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: HOWTO convert year/week date 1999/43 to 24.10.1999???
Message-Id: <x3yso2w96sa.fsf@tigre.matrox.com>
dabbu_2000@my-deja.com writes:
> It says "Can't Locate Date/Calc.pm in @INC"
> and a bunch of file paths.
>
> What does this mean??
It means that the Date::Calc module is not installed on your
system. Grab a copy from www.cpan.org.
--Ala
------------------------------
Date: Tue, 26 Oct 1999 16:57:04 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: HOWTO convert year/week date 1999/43 to 24.10.1999???
Message-Id: <38163FD0.D3B5E2A8@mail.cor.epa.gov>
[Jeopardy-style reply re-written at immense expense by me]
dabbu_2000@my-deja.com wrote:
>
> sb@engelschall.com (Steffen Beyer) wrote:
> > In comp.lang.perl.misc dabbu_2000@my-deja.com wrote:
> >
> > > How can I check as to what modules are available? I have never used
> > > inbuilt modules.
> >
> > % perl -e 'use Date::Calc 5.0'
>
> It says "Can't Locate Date/Calc.pm in @INC"
> and a bunch of file paths.
>
> What does this mean??
It means that Perl looked in all the standard places it knows
to look, and couldn't find that module anywhere. If you had
included those filepaths, we could have told you whether your
Perl was looking in the reasonable places or not.
Presumably Date::Calc has not been installed on your
machine. If you have a win32 system, get it from
ActiveState using their ppm program. Otherwise, get it
from CPAN [www.cpan.org] .
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 26 Oct 1999 22:21:30 GMT
From: dabbu_2000@my-deja.com
Subject: Re: HOWTO convert year/week date 1999/43 to 24.10.1999???
Message-Id: <7v59h7$oak$1@nnrp1.deja.com>
It says "Can't Locate Date/Calc.pm in @INC"
and a bunch of file paths.
What does this mean??
thanks
In article <7v47s6$k3k$4@solti3.sdm.de>,
sb@engelschall.com (Steffen Beyer) wrote:
> In comp.lang.perl.misc dabbu_2000@my-deja.com wrote:
>
> > How can I check as to what modules are available? I have never used
> > inbuilt modules.
>
> % perl -e 'use Date::Calc 5.0'
>
> The resulting error message will tell you wether the module is
installed,
> and if so, which version.
>
> Regards,
> --
> Steffen Beyer <sb@engelschall.com>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 26 Oct 1999 12:47:02 GMT
From: Steffen Beyer <sb@sdm.de>
Subject: Re: HOWTO convert year/week date 1999/43 to 24.10.1999???
Message-Id: <7v47s6$k3k$4@solti3.sdm.de>
In comp.lang.perl.misc dabbu_2000@my-deja.com wrote:
> How can I check as to what modules are available? I have never used
> inbuilt modules.
% perl -e 'use Date::Calc 5.0'
The resulting error message will tell you wether the module is installed,
and if so, which version.
Regards,
--
Steffen Beyer <sb@engelschall.com>
http://www.engelschall.com/u/sb/whoami/ (Who am I)
http://www.engelschall.com/u/sb/gallery/ (Fotos Brasil, USA, ...)
http://www.engelschall.com/u/sb/download/ (Free Perl and C Software)
------------------------------
Date: Mon, 25 Oct 1999 13:17:40 GMT
From: dabbu_2000@my-deja.com
Subject: Re: HOWTO convert year/week date 1999/43 to 24.10.1999???
Message-Id: <7v1l9h$2b4$1@nnrp1.deja.com>
Hi,
How can I check as to what modules are available? I have never used
inbuilt modules.
thanks
In article <7uvvve$h4f$1@solti3.sdm.de>,
sb@engelschall.com (Steffen Beyer) wrote:
> In comp.lang.perl.misc Thomas Frei <thomas.frei@erp-solutions.de>
wrote:
>
> > I`ve got strings holding "1999/43" or "1999/44".
>
> > Does anybody now how I can convert that string to the date of the
first
> > monday of that week?
>
> > Thanks
> > Thomas
>
> use Date::Calc qw(:all);
>
> ($year,$month,$day) = Monday_of_Week($week,$year);
>
> See http://www.perl.com/CPAN/modules/by-module/Date/
> to download this module (Date-Calc-4.2.tar.gz).
>
> Regards,
> --
> Steffen Beyer <sb@engelschall.com>
> http://www.engelschall.com/u/sb/whoami/ (Who am I)
> http://www.engelschall.com/u/sb/gallery/ (Fotos Brasil, USA, ...)
> http://www.engelschall.com/u/sb/download/ (Free Perl and C
Software)
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 27 Oct 1999 22:21:40 GMT
From: Scratchie <AgitatorsBand@yahoo.com>
Subject: Re: HOWTO convert year/week date 1999/43 to 24.10.1999???
Message-Id: <UVKR3.1773$LR3.316079@news.shore.net>
dabbu_2000@my-deja.com wrote:
: It says "Can't Locate Date/Calc.pm in @INC"
: and a bunch of file paths.
: What does this mean??
Pretty much what it says. @INC contains all the places where perl will
look for modules and library files, and "Date/Calc.pm" isn't in any of
them. You probably need to install the module yourself.
--Art
--
--------------------------------------------------------------------------
National Ska & Reggae Calendar
http://www.agitators.com/calendar/
--------------------------------------------------------------------------
------------------------------
Date: Wed, 27 Oct 1999 15:16:52 -0500
From: "Hank Marquardt" <hmarq@interaccess.com>
Subject: HTML Table to Array?
Message-Id: <s1enmbaer0860@corp.supernews.com>
Is there a function/module that takes a html file, looks for tables and then
will return an array of values based on individual rows/cell contents? I
started to write code in my head, decided it was non-trivial and thought I'd
see if it had been done already?
Any ideas/pointers?
Hank
------------------------------
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 1184
**************************************