[26937] in Perl-Users-Digest
Perl-Users Digest, Issue: 8905 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jan 31 09:05:19 2006
Date: Tue, 31 Jan 2006 06:05:05 -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 Tue, 31 Jan 2006 Volume: 10 Number: 8905
Today's topics:
DBI and GZip database <d.cretel@wyniwyg.com>
Re: How to use Registry functions <mrtest@amdosoft.com>
Re: How to use Registry functions <1usa@llenroc.ude.invalid>
Substitutions in matched patterns? <forum@anton.e4ward.com>
Re: Substitutions in matched patterns? <bernard.el-haginDODGE_THIS@lido-tech.net>
Re: Substitutions in matched patterns? <forum@anton.e4ward.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 31 Jan 2006 13:36:00 +0100
From: =?ISO-8859-1?Q?Dominique_Cr=E9tel?= <d.cretel@wyniwyg.com>
Subject: DBI and GZip database
Message-Id: <43df596d$0$4760$636a55ce@news.free.fr>
Hello,
I'm trying again !
I have a gzip file containing DBase files like this :
mydb.gz:
firstdir
+---seconddir
+---aaa.dbf
+---bbb.dbf
+---ccc.dbf
+---...
This script below works fine if I uncompress it :
-----------------
#!/usr/bin/perl
use DBI;
my $dbh = DBI->connect("DBI:XBase:./firstdir/seconddir")
or die "error connecting to database :" . $DBI::errstr;
my $sth = $dbh->prepare("SELECT col1, col2 FROM table1")
or die "SQL error SQL:".$dbh->errstr();
$sth->execute or die "error while executing query:".$sth->errstr();
...
-----------------
Is it posible to work directly from the zip file ?
(but arranged for DBI)
-----------------
#!/bin/perl -w
my $file = "mydb.zip";
open (FIC, "|gzip -d < $file")
or die "Cannot read file '$file'";
...
-----------------
Thanks for your help !
------------------------------
Date: Tue, 31 Jan 2006 13:59:04 +0100
From: "Marco Roda" <mrtest@amdosoft.com>
Subject: Re: How to use Registry functions
Message-Id: <drnmun$7e2$1@ss405.t-com.hr>
Yes, It is so simple and so good,
Thanks,
Marco
"A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in message
news:Xns975B69311F7E4asu1cornelledu@132.236.56.8...
> "Marco Roda" <mrtest@amdosoft.com> wrote in
> news:drl5tr$oi4$1@ss405.t-com.hr:
>
> > I should use NTRegOpenKeyEx to read a registry key.
> > I got some example like:
> > <
> > require 'NT.ph';
> > use Win32::Registry;
> >
> > $rc = NTRegOpenKeyEx ( &HKEY_LOCAL_MACHINE,
> > 'SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\Virtual Roots',
> > &NULL, &KEY_ALL_ACCESS, $PerlKey );
> > NTRegQueryValueEx( $PerlKey, '/', &NULL, $type, $HttpRoot );
> >>
> > but I have no NT.ph
> > - where should I found it ?
> > - how to install ?
>
> I have no idea.
>
> On the other hand, CPAN is your friend.
>
> http://search.cpan.org/~tyemq/Win32-TieRegistry-0.24/TieRegistry.pm
>
> The documentation shows no mention of NT.ph.
>
> Also, if you had looked, you would have seen:
>
> Win32::Registry - accessing the Windows registry [obsolete, use
> Win32::TieRegistry]
>
> Hope this helps.
>
> Sinan
------------------------------
Date: Tue, 31 Jan 2006 13:43:52 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: How to use Registry functions
Message-Id: <Xns975C58E51FB3Dasu1cornelledu@127.0.0.1>
"Marco Roda" <mrtest@amdosoft.com> wrote in news:drnmun$7e2$1@ss405.t-
com.hr:
> "A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in message
> news:Xns975B69311F7E4asu1cornelledu@132.236.56.8...
...
>> Win32::Registry - accessing the Windows registry [obsolete, use
>> Win32::TieRegistry]
>>
>> Hope this helps.
> Yes, It is so simple and so good,
> Thanks,
You are welcome.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)
comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
------------------------------
Date: Tue, 31 Jan 2006 14:28:21 +0100
From: Anton81 <forum@anton.e4ward.com>
Subject: Substitutions in matched patterns?
Message-Id: <drnoll$tar$1@gwdu112.gwdg.de>
Hi,
what is the easiest way to do substitutions in matched strings.
For example I want to do s/ABC/DEF/g , but only if the ABC is between
braces.
Anton
------------------------------
Date: Tue, 31 Jan 2006 14:32:32 +0100
From: "Bernard El-Hagin" <bernard.el-haginDODGE_THIS@lido-tech.net>
Subject: Re: Substitutions in matched patterns?
Message-Id: <Xns975C93EEB19E5elhber1lidotechnet@10.232.40.227>
Anton81 <forum@anton.e4ward.com> wrote:
> Hi,
>
> what is the easiest way to do substitutions in matched strings.
> For example I want to do s/ABC/DEF/g , but only if the ABC is between
> braces.
s/{ABC}/{DEF}/g;
--
Cheers,
Bernard
------------------------------
Date: Tue, 31 Jan 2006 14:56:48 +0100
From: Anton81 <forum@anton.e4ward.com>
Subject: Re: Substitutions in matched patterns?
Message-Id: <drnqb0$uqk$1@gwdu112.gwdg.de>
>> what is the easiest way to do substitutions in matched strings.
>> For example I want to do s/ABC/DEF/g , but only if the ABC is between
>> braces.
> s/{ABC}/{DEF}/g;
ABC is not directly between braces. It's more something like
s/({.*)ABC(.*})/\1DEF\2/g
but as it get's more complicating (more different substitutions), one needs
another solution.
Anton
------------------------------
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 8905
***************************************