DBD::SQLite and column_info

2008-09-03 Thread sam . paquin
How do you use column_info with DBD::SQLite? Any set of parameters I use result in getting back undef. All of the following commands return undef but $DBI::err remains false: $info = $dbh->column_info('%', '%', '%', '%'); $info = $dbh->column_info('%', '%', 'mytable', '%');

Re: Regex in a variable

2008-09-03 Thread Mr. Shawn H. Corey
On Tue, 2008-09-02 at 17:10 +0200, Paolo Gianrossi wrote: > On Tue, 2008-09-02 at 10:51 -0400, Mr. Shawn H. Corey wrote: > > > Sorry, it's Tuesday after a long weekend; brain is not fully in gear > > yet. Try: > > > > while( eval "\$text =~ s/$rexp/$replacement/$flags" ){ > > I tried this. Actu

Redhat/Centos users

2008-09-03 Thread Brent Clark
I suggest you read this. http://weblog.infoworld.com/fatalexception/archives/2008/08/bitten_by_the_r.html and http://blog.vipul.net/2008/08/24/redhat-perl-what-a-tragedy/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

substitute using directory name

2008-09-03 Thread brian54321uk
Hi I would like to replace a string of characters in a file to the name of the directory it is in. Thefore, in the example below, I would like to know how to replace "?" open( F, $ARGV[0] ); while( ) { s!abc123!?!; s!xyz123!123xyz!; { print; } } Any help much appreciated. Brian

Re: substitute using directory name

2008-09-03 Thread Mr. Shawn H. Corey
On Wed, 2008-09-03 at 14:55 +0100, brian54321uk wrote: > Hi > I would like to replace a string of characters in a file to the name of > the directory it is in. > Thefore, in the example below, I would like to know how to replace "?" > > > open( F, $ARGV[0] ); > > while( ) { > > s!abc123!?!;

Re:substitute using directory name

2008-09-03 Thread Jeff Pang
> Message du 03/09/08 15:56 > De : "brian54321uk" > A : beginners@perl.org > Copie à : > Objet : substitute using directory name > > > Hi > I would like to replace a string of characters in a file to the name of > the directory it is in. > Thefore, in the example below, I would like to know how t

Perl installation on LINUX?

2008-09-03 Thread sanket
Hi all, I have downloaded perl 5.10. I install it using following steps: sh Configure -de -Dprefix=/mnt/hdc8/Perl make make test make install when I run 'make' after configure, I get following message. No rule to make target 'test'. stop Note:- I am navigated to

Re: Perl installation on LINUX?

2008-09-03 Thread TADIPAH
Linux came out of the box for me. So, i think its by default availabe. Try to do this "find / -name perl -print" Thanks, Hary sanket <[EMAIL PROTECTED]> 09/03/2008 08:44 AM From sanket <[EMAIL PROTECTED]> To beginners@perl.org cc Subject Perl installation on LINUX? Hi all, I hav

Re: substitute using directory name

2008-09-03 Thread brian54321uk
Mr. Shawn H. Corey wrote: On Wed, 2008-09-03 at 14:55 +0100, brian54321uk wrote: Hi I would like to replace a string of characters in a file to the name of the directory it is in. Thefore, in the example below, I would like to know how to replace "?" open( F, $ARGV[0] ); while( ) { s!ab

Re: substitute using directory name

2008-09-03 Thread Mr. Shawn H. Corey
On Wed, 2008-09-03 at 16:47 +0100, brian54321uk wrote: > Just tested this out and unfortunately instead of dirname replacing > abc123, I get a . That's because the dirname is a '.' Try: use Cwd; if( (my $dir = dirname( $file )) eq '.' ){ $dir = cwd(); } -- Just my 0.0002 million dollar

Re: substitute using directory name

2008-09-03 Thread Louis-Philippe
what Shawn just wrote could be ok for you Brian, but only if you change working directory while processing files, because his script uses cwd() to get directory (which reads 'current working directory') the other option would be to say: use File::Basename; use File::Spec; my @alldirs = File::Spe

Re: substitute using directory name

2008-09-03 Thread brian54321uk
Thanks for the input, having tested Shawns solution, I will probably find at a later date that it is vital I include the full pathname in future output, so will subject the file to a second pass to get rid of the full pathname whilst I am at my present testing point. However, I would like to get

Re: substitute using directory name

2008-09-03 Thread Louis-Philippe
just the folder name? test the snippet I posted earlier... it should do it for you! L-P 2008/9/3 brian54321uk <[EMAIL PROTECTED]> > Thanks for the input, having tested Shawns solution, I will probably find > at a later date that it is vital I include the full pathname in future > output, so will

issue with my subroutine/library script.

2008-09-03 Thread Raul Ruiz Jr.
I created a card shuffling program and it works fine. However, for my project I am to place the shuffling part of my code in a separate script as a subroutine. I am to remove the code that does the shuffling and include it as another function in obj13-lib.pl. So I did this and  after the first "

Issue with my subroutine/library script.

2008-09-03 Thread Raul Ruiz Jr.
I created a card shuffling program and it works fine. However, for my project I am to place the shuffling part of my code in a separate script as a subroutine. I am to remove the code that does the shuffling and include it as another function in obj13-lib.pl. So I did this and  after the first "h

Re: Issue with my subroutine/library script.

2008-09-03 Thread Raja Vadlamudi
On 9/3/08 4:01 PM, "Raul Ruiz Jr." <[EMAIL PROTECTED]> wrote: > I created a card shuffling program and it works > fine. However, for my project I am to place the shuffling part of my > code in a separate script as a subroutine. > > I am to remove the code > that does the shuffling and include

Re: issue with my subroutine/library script.

2008-09-03 Thread Mr. Shawn H. Corey
On Wed, 2008-09-03 at 12:51 -0700, Raul Ruiz Jr. wrote: > I created a card shuffling program and it works fine. However, for my project > I am to place the shuffling part of my code in a separate script as a > subroutine. > > I am to remove the code > that does the shuffling and include it as a

perl if/then

2008-09-03 Thread littlehelphere
I have a script in which I distribute directories to host. I use either rdist or scp based on their OS. For example older sun machines need rdist while newer machines can use scp. For some reason the function below only resorts to scp. what I would like to do is an if/ then statement. I know in

Re: perl if/then

2008-09-03 Thread Raja Vadlamudi
$? Is a child error status and it works in perl too. Try to print it out and see what it says. On 9/3/08 3:43 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I have a script in which I distribute directories to host. I use > either rdist or scp based on their OS. For example older sun mac

Re: Only getting format header on first file of a series

2008-09-03 Thread Dave Thacker
On Tuesday 02 September 2008 09:15:59 Rob Dixon wrote: > Dave Thacker wrote: > > On Monday 01 September 2008 20:29:27 Rob Dixon wrote: > >> $- = 0; > > > > Unfortunately, there's no change after inserting that assignment. > > Thanks for the other info on the improving the preparation of the SQL

Perl installation on LINUX

2008-09-03 Thread sanket vaidya
Hi all, I have downloaded perl 5.10. I install it using following steps: sh Configure -de -Dprefix=/mnt/hdc8/Perl make make test make install when I run 'make' after configure, I get following message. No rule to make target 'test'. stop Note:- I am navi