[29370] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 614 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jul 3 11:10:14 2007

Date: Tue, 3 Jul 2007 08:09:06 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 3 Jul 2007     Volume: 11 Number: 614

Today's topics:
        dump_results  aaron80v@yahoo.com.au
    Re: dump_results <mgjv@tradingpost.com.au>
    Re: dump_results  aaron80v@yahoo.com.au
    Re: FAQ 4.9 How can I output Roman numerals? <bik.mido@tiscalinet.it>
    Re: Portable general timestamp format, not 2038-limited <martin@see.sig.for.address>
    Re: Portable general timestamp format, not 2038-limited <hjp-usenet2@hjp.at>
    Re: Portable general timestamp format, not 2038-limited <rjh@see.sig.invalid>
    Re: unlurking <bik.mido@tiscalinet.it>
    Re: unlurking <bik.mido@tiscalinet.it>
    Re: unlurking <bik.mido@tiscalinet.it>
    Re: unlurking <bik.mido@tiscalinet.it>
        why /usr/bin/cpan can't find HTML::Mail ? <iler.ml@gmail.com>
    Re: why /usr/bin/cpan can't find HTML::Mail ? <mritty@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Tue, 03 Jul 2007 04:13:25 -0700
From:  aaron80v@yahoo.com.au
Subject: dump_results
Message-Id: <1183461205.849235.76390@e9g2000prf.googlegroups.com>


Does anyone know if DBI dump results API allow a dump without putting
single quotes around the column values?
I don't see an option.

Aaron



------------------------------

Date: Tue, 3 Jul 2007 22:34:35 +1000
From: Martien verbruggen <mgjv@tradingpost.com.au>
Subject: Re: dump_results
Message-Id: <slrnf8kgir.sh4.mgjv@martien.heliotrope.home>

On Tue, 03 Jul 2007 04:13:25 -0700,
	aaron80v@yahoo.com.au <aaron80v@yahoo.com.au> wrote:
>
> Does anyone know if DBI dump results API allow a dump without putting
> single quotes around the column values?

DBI::dump_results() calls DBI::neat_list() for each row, which calls
DBI::neat() for each element. DBI::neat() quotes string valuess, which
is, I presume, what you're asking about?

> I don't see an option.

I don't know of a (documented) option either. You could always replace
DBI::neat() with your own method, but I wouldn't recommend that without
knowing what the puprose is.

What is the purpose of your question?

Martien
-- 
                        | 
Martien Verbruggen      | Unix is user friendly. It's just selective
                        | about its friends.
                        | 


------------------------------

Date: Tue, 03 Jul 2007 06:49:02 -0700
From:  aaron80v@yahoo.com.au
Subject: Re: dump_results
Message-Id: <1183470542.849514.232450@i38g2000prf.googlegroups.com>

On Jul 3, 8:34 pm, Martien verbruggen <m...@tradingpost.com.au> wrote:
> On Tue, 03 Jul 2007 04:13:25 -0700,
>         aaron...@yahoo.com.au <aaron...@yahoo.com.au> wrote:
>
>
>
> > Does anyone know if DBI dump results API allow a dump without putting
> > single quotes around the column values?
>
> DBI::dump_results() calls DBI::neat_list() for each row, which calls
> DBI::neat() for each element. DBI::neat() quotes string valuess, which
> is, I presume, what you're asking about?
>
> > I don't see an option.
>
> I don't know of a (documented) option either. You could always replace
> DBI::neat() with your own method, but I wouldn't recommend that without
> knowing what the puprose is.
>
> What is the purpose of your question?
>
> Martien
> --
>                         |
> Martien Verbruggen      | Unix is user friendly. It's just selective
>                         | about its friends.
>                         |

The purpose is to get the right value delimiter such as double-quote,
no quote at all etc for batch load data into database. For example, by
default using dump_results(), even integer, smallint, decimal are
delimited with single quote which during loaded will be mistaken to be
varchar.

Aaron



------------------------------

Date: Tue, 03 Jul 2007 14:12:17 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: FAQ 4.9 How can I output Roman numerals?
Message-Id: <t0fk839rcmhmc8lfgf9nhtrag8dkfbsm5k@4ax.com>

On Mon, 2 Jul 2007 18:03:02 -0700, PerlFAQ Server
<brian@stonehenge.com> wrote:

>4.9: How can I output Roman numerals?
>
>    Get the http://www.cpan.org/modules/by-module/Roman module.

<btw>
Also, a funny Acme::Roman has been announced. See description and
technical discussion at:

http://perlmonks.org/?node_id=624100
</btw>


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


------------------------------

Date: Tue, 03 Jul 2007 12:24:19 +0100
From: Martin Gregorie <martin@see.sig.for.address>
Subject: Re: Portable general timestamp format, not 2038-limited
Message-Id: <48opl4-uaj.ln1@zoogz.gregorie.org>

Peter J. Holzer wrote:
> On 2007-07-03 05:12, Scott David Daniels <scott.daniels@acm.org> wrote:
>> TOPS-20 did an interesting format which suggest an interesting variant:
>>      Tops-20:  36-bit (the machine word size) fixed-bit representation
>>                of days since a given moment (the first Photographic
>>                plates of the sky).  The "binary point" was at the middle
>>                of the word; the low order 18 bits were the time of day
>>                (GMT), the high-order 18 bits were the days-since date.
>>
I think there's a definite practical advantage in storing dates as a day 
count from a base date and providing a standard set of 
procedures/methods to convert it to and from a human-readable format. It 
makes all sorts of date calculations much easier. For instance, if 
there's a requirement to produce statements dated for the last day of 
the current month the pseudo code is simply:
- convert the date to ccyymmdd format
- add 1 to the month, adjusting the year and century to fix
   year roll-over and set the day to 1
- convert back to day count and subtract 1
- the result, output in readable form is the last day of the month
   irrespective of month length, leap years, etc.

I don';t think it matters what the base date is, though the Astronomical 
base date [12 noon on 1 JAN -4712 (4713 BC)] may be as good as any. 
Other bases I've seen (apart from UNIX date) are ICL 1900 mainframes, 
which set day zero as 31 Dec 1899 and held the time separately. ICL 2900 
systems held the date and time as microseconds since 00:00:00 1900-01-01 
in a 64 bit word, which is also easy to deal with and allows the same 
set of date arithmetic operations as a straight day number.

BTW, be sure to distinguish Julian Day and Modified Julian Day (used by 
astronomers from the "Julian Date" that [used to] be used by IBM 
mainframes. The former is a day count but the latter is day within year 
(yyddd). JD and MJD are described in:

http://tycho.usno.navy.mil/mjd.html


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |


------------------------------

Date: Tue, 3 Jul 2007 15:47:53 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Portable general timestamp format, not 2038-limited
Message-Id: <slrnf8kks9.f5k.hjp-usenet2@zeno.hjp.at>

On 2007-07-03 08:57, Richard Heathfield <rjh@see.sig.invalid> wrote:
> Paul Rubin said:
>> sla29970@gmail.com writes:
>>> As for the primacy of UTC vs. TAI, this is the classical chicken and
>>> egg problem.  The bureaucratic reality is opposed to the physical
>>> reality.
>> 
>> Well, if you're trying to pick just one timestamp standard, I'd say
>> you're better off using a worldwide one rather than a national one, no
>> matter how the bureaucracies work.
>
> In that case, the obvious choice is Greenwich Mean Time.  :-)

Hardly. That hasn't been in use for over 35 years (according to
Wikipedia).


> Seriously, GMT is recognised all over the world (far more so, in fact,
> than UTC, which tends to be recognised only by some well-educated
> people, and there are precious few of those), so why not use it?

While the layman may recognize the term "GMT", he almost certainly means
"UTC" when he's talking about GMT. GMT was based on astronomical
observations and the be best approximation available today is probably
UT1, which may differ from UTC by up to 0.5 seconds.

> I always leave my PC's clock set to GMT,

Your PC is directly linked to an observatory? Impressive :-). If you
synchronize your PC to any external time source, it's almost certainly
UTC, not GMT or UT1. If you don't synchronize it it's so far off that it
doesn't matter.

	hp

-- 
   _  | Peter J. Holzer    | I know I'd be respectful of a pirate 
|_|_) | Sysadmin WSR       | with an emu on his shoulder.
| |   | hjp@hjp.at         |
__/   | http://www.hjp.at/ |	-- Sam in "Freefall"


------------------------------

Date: Tue, 03 Jul 2007 13:53:44 +0000
From: Richard Heathfield <rjh@see.sig.invalid>
Subject: Re: Portable general timestamp format, not 2038-limited
Message-Id: <u96dnaXnQZ76yRfbnZ2dnUVZ8qLinZ2d@bt.com>

Peter J. Holzer said:

> On 2007-07-03 08:57, Richard Heathfield <rjh@see.sig.invalid> wrote:
>> Paul Rubin said:
>>> sla29970@gmail.com writes:
>>>> As for the primacy of UTC vs. TAI, this is the classical chicken
>>>> and
>>>> egg problem.  The bureaucratic reality is opposed to the physical
>>>> reality.
>>> 
>>> Well, if you're trying to pick just one timestamp standard, I'd say
>>> you're better off using a worldwide one rather than a national one,
>>> no matter how the bureaucracies work.
>>
>> In that case, the obvious choice is Greenwich Mean Time.  :-)
> 
> Hardly. That hasn't been in use for over 35 years (according to
> Wikipedia).

Nonsense. I use it every day, and have been doing so for - well, rather 
more than 35 years.

>> Seriously, GMT is recognised all over the world (far more so, in
>> fact, than UTC, which tends to be recognised only by some
>> well-educated people, and there are precious few of those), so why
>> not use it?
> 
> While the layman may recognize the term "GMT", he almost certainly
> means "UTC" when he's talking about GMT.

Most people of my acquaintance who use the term "GMT" mean precisely 
that - Greenwich Mean Time.

<snip>

>> I always leave my PC's clock set to GMT,
> 
> Your PC is directly linked to an observatory?

Nope. My PC *defines* GMT. If the observatory wants to know what the 
exact time is, they only have to ask.

-- 
Richard Heathfield <http://www.cpax.org.uk>
Email: -www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999


------------------------------

Date: Tue, 03 Jul 2007 11:52:49 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: unlurking
Message-Id: <817k83dvfuhij0pskbn0s8ujfa3osd1hk8@4ax.com>

On Sun, 1 Jul 2007 19:07:29 -0500, Tad McClellan
<tadmc@seesig.invalid> wrote:

>> I was 
>> also unsure whether __END__ was part of the script or a way of saying "stop 
>> snipping here" on a usenet message.  
>
>
>It can be both.

The point being, for the benefit of the OP, that in $Larry's own
words, the shebang line is much like a "hello" and the __END__ token,
a "bye".


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


------------------------------

Date: Tue, 03 Jul 2007 12:06:21 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: unlurking
Message-Id: <r77k83dadk4kdgesep1n9mbrkosdlbplhq@4ax.com>

On Mon, 2 Jul 2007 17:35:48 -0400, "Wade Ward" <invalid@invalid.nyet>
wrote:

>What did it avail me to put in my own newsserver if I don't also give it a 
>username and password?

It depends on your newsserver policy: some require no authentication
if you connect from a known IP. Some require it, with different
methods. Of course this has nothing to do with Perl: how do you set
your own newsreader? (Which happens to be M$ OE, afaics.)


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


------------------------------

Date: Tue, 03 Jul 2007 12:22:02 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: unlurking
Message-Id: <6h8k835os7e6sqgq2bqc4gu0t2oaimasbl@4ax.com>

On Mon, 2 Jul 2007 02:06:26 -0400, "Wade Ward" <invalid@invalid.nyet>
wrote:

>#begin excerpt

From what?

>group ( [ GROUP ] )
>Set and/or get the current group. If GROUP is not given then information is 
>returned on the current group.
>
>In a scalar context it returns the group name.
>
>In an array context the return value is a list containing, the number of 
>articles in the group, the number of the first article, the number of the 
>last article and the group name.
>#end excerpt
>My guess is that my notion of a group is different from what Perlites(?) 

It depends on (i) what your notion is, which you don't explain and
(ii) what you suspect Perlities(?) to think it is, which you also
don't explain.

>think it is.  I included "newgroups" because I thought it read "newsgroups." 

Evidence is that "gruoup" is "newsgroup". NO reason why it should mean
anything else. What could possibly make you think so?


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


------------------------------

Date: Tue, 03 Jul 2007 12:14:24 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: unlurking
Message-Id: <pu7k831ls4nvim8joncific9rc9dh79mcs@4ax.com>

On Mon, 2 Jul 2007 20:54:12 -0400, "Wade Ward" <invalid@invalid.nyet>
wrote:

>>> Perl.exe is complaining about line 10, which is:
[snip]

How 'bout taking into account that piece of advice that has been
already offered to you several times, to trim the amount of quoted
content?

>I've looked at whatever I could google with (NNTP scripts Perl)
>chased perl links:
>http://pub.ks-and-ks.ne.jp/prog/perl-bin.html

Not a very good strategy, IMHO. The answer is very very likely to be
in the docs you've repeatedly been pointed to. Taking random code out
of the web and inserting it into your own program is not likely to
work unless you *really* understand what it does. Which doesn't seem
to be the case.

>, and tried to make this work a hundred different ways without success
>
>#!/usr/bin/env perl
>#use strict;
>use warnings;
>use Net::NNTP;
>
>my $nntp = Net::NNTP->new('newsgroups.comcast.net', { Debug => 1} );
>$USER = 'zaxfuuq';
>$PASS = 'redacted';

I hope they're not the real ones! Do a favour to yourself and mangle
them.

>$nntp -> authinfo ( USER, PASS) or die "Authentication problem\n";

$USER and $PASS are *variables*. USER and PASS are *barewords*. Is
that your real code? Since you're under strict and warnings, what does
perl really tell you when you run the program?


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


------------------------------

Date: Tue, 03 Jul 2007 11:22:09 -0000
From:  Yakov <iler.ml@gmail.com>
Subject: why /usr/bin/cpan can't find HTML::Mail ?
Message-Id: <1183461729.708211.214270@57g2000hsv.googlegroups.com>

Why cpan.org has HTML::Mail but /usr/bin/cpan says it can't find
HTML::Mail ? I tried on several computers, same result.

Yakov



------------------------------

Date: Tue, 03 Jul 2007 05:42:32 -0700
From:  Paul Lalli <mritty@gmail.com>
Subject: Re: why /usr/bin/cpan can't find HTML::Mail ?
Message-Id: <1183466552.508160.284070@k29g2000hsd.googlegroups.com>

On Jul 3, 7:22 am, Yakov <iler...@gmail.com> wrote:
> Why cpan.org has HTML::Mail but /usr/bin/cpan says it can't find
> HTML::Mail ? I tried on several computers, same result.

Looking at http://search.cpan.org/~plank/HTML-Mail-0.02_05/, it
doesn't appear that the author has ever released a non-Developer
release of the module.  I believe CPAN.pm only looks for "real"
releases.

Paul Lalli



------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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 V11 Issue 614
**************************************


home help back first fref pref prev next nref lref last post