[24130] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6324 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 29 03:05:42 2004

Date: Mon, 29 Mar 2004 00:05:06 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 29 Mar 2004     Volume: 10 Number: 6324

Today's topics:
    Re: Choosing Perl/Python for my particular niche <cwilbur@mithril.chromatico.net>
    Re: Help!! Cannot insert TIMESTAMP after upgrade. <wgemini@spamkiller.dynalias.com>
    Re: Included directory problem <chatiman@free.fr>
    Re: life time of $1? <tadmc@augustmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 29 Mar 2004 07:14:42 GMT
From: Charlton Wilbur <cwilbur@mithril.chromatico.net>
Subject: Re: Choosing Perl/Python for my particular niche
Message-Id: <87ptawf7rj.fsf@mithril.chromatico.net>

>>>>> "CL" == Cameron Laird <claird@lairds.com> writes:

    CL> Try 'em both briefly, choose one that makes a
    CL> good impression, and get back to your engineering work.
    CL> You'll be glad you upgraded to a 'P' language.  

You, sir, have written a clear, fair-minded, and reasonable post.  The
Backbone Cabal will be revoking your Usenet license shortly.

(I concur, by the way: Python has a couple of traits that would drive
me, with close to 10 years of Perl experience, bonkers; but they don't
drive everyone bonkers, and they obviously suit some people, or they
wouldn't be in the language.  The OP ought to spend a couple weeks
playing with each language and pick the one that seems to suit his
style better.)

Charlton

-- 
cwilbur at chromatico dot net
cwilbur at mac dot com


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

Date: Mon, 29 Mar 2004 06:00:55 GMT
From: W Gemini <wgemini@spamkiller.dynalias.com>
Subject: Re: Help!! Cannot insert TIMESTAMP after upgrade.
Message-Id: <boa84c.gng.ln@192.168.2.102>

Hemant Shah wrote:
> Folks,
> 
>  I recently upgraded/migrated my database from UDB 7.2 on AIX to UDB 8.1 on
>  Linux. Now I cannot insert data into a TIMESTAMP column. The string I am
>  using for TIMESTAMP is in ISO format.
> 
>  The old database was using ISO-8859-1 character set, the new database is
>  using UTF-8. I have a perl script that inserts data into one of the table
>  that has time stamp column. The script worked in UDB 7 database but fails
>  with SQL0180N in UDB 8.
> 
> 
> 1246:         $InsertStmt_CodeChanged_Hdl->execute($SourceNum, $RevBranch, $RevDecimal,
> 1247:                                     $TimeStamp, $Author, $Command, $SubCommand,
> 1248:                                     $LinesAdded, $LinesDeleted);
>   DB<2> p $TimeStamp
> 2004-03-28-17:06:39.816398
>   DB<3> n
> lidp12|InsertCodeChangedData: DBD::DB2::st execute failed: [IBM][CLI Driver][DB2/LINUX] SQL0180N  The syntax of the string representation of a datetime value is incorrect.  SQLSTATE=22007
> 
> 
> I tried to run following command on the client system but that did not help 
> either.
> 
>  db2 bind @db2cli.lst DATETIME ISO blocking all grant public
>  db2 bind @db2ubind.lst DATETIME ISO blocking all grant public
> 
>  How can I fix it? I need to fix it A.S.A.P.
> 
>  Thanks.
> 

Try 2004-03-28-17.06.39.816398.



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

Date: Mon, 29 Mar 2004 09:45:13 +0200
From: "chatiman" <chatiman@free.fr>
Subject: Re: Included directory problem
Message-Id: <4067d402$0$8912$636a15ce@news.free.fr>


"John Bokma" <postmaster@castleamber.com> a écrit dans le message de news:
406741df$0$24356$58c7af7e@news.kabelfoon.nl...

> For ages, what do you think the modules at CPAN modules use, for
> example? And yes, you can install as a non root user, in your local
> directory. You can specify a path where the install should be put. And
> no, you can not install as a non root user in a dir you haven´t got
> access to.
>
My question must not be understood (I'm not english).
I know that I can install packages as non root user with the "prefix"
option,
the problem is to know which directory to include in the :
use lib "...";
directive

I tried :
use lib "./perl";
(then ./script.pl)
but it couldn't find the module which is in :
 ./perl/lib/5.00503/i386-linux/auto/


> --
> John                            personal page:  http://johnbokma.com/
>
> Freelance Perl / Java developer available  -  http://castleamber.com/




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

Date: Sun, 28 Mar 2004 22:45:43 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: life time of $1?
Message-Id: <slrnc6fafn.ai1.tadmc@magna.augustmail.com>

Myron Turner <mturner@ms.umanitoba.ca> wrote:
> On Sat, 27 Mar 2004 14:13:29 -0600, Tad McClellan
><tadmc@augustmail.com> wrote:


>>You should never use the dollar-digit variables unless you
>>have first ensured that the match _succeeded_. (I have
>>pointed this out to you before.)
> 
> In a loop, if your code depends on testing a numbered $ variable, to
> determine whether something has occurred,  you can place the regular
> expression in an eval:


But why?

All you need to do is verify that the pattern match indeed succeeded:

   if ( /(\d+)/ ) {
      # safe to use $1 here
   }

or

   next unless /(\d+)/;
   # safe to use $1 here


> while(<>) {
>     my $num = eval{  /(\d+)/; return $1 if $1; return undef; };
>    check_this_number($num) if $num;
> }
> 
> If you don't use the eval, then the next time through the loop, there
> might not be a number in $_, but $1 would still test true because it
> would still hold the number from the previous iteration.


Any boolean test on the match's return value will avoid that too,
There is no need for eval() here.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

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 V10 Issue 6324
***************************************


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