Re: get mysql data by column name

2006-10-16 Thread Rob Dixon
Dan wrote: Hi everybody I've been using DBI for a while now, having made some large programs utilising a mysql db, and all have been successful. But I've come across one project now that may be a little more taxing on my knowledge of DBI. All the while I've been using DBI, I've been getting da

get mysql data by column name

2006-10-16 Thread Dan
Hi everybody I've been using DBI for a while now, having made some large programs utilising a mysql db, and all have been successful. But I've come across one project now that may be a little more taxing on my knowledge of DBI. All the while I've been using DBI, I've been getting data by column

Re: how to configure the options.

2006-10-16 Thread Tom Phoenix
On 10/15/06, perl pra <[EMAIL PROTECTED]> wrote: I have to call some perl scripts with command line arguements from another perl script. (some thing like this) perl -s -a $ENV{X} -b $ENV{Y} -c $ENV{Z} ; ( -a , -b, -c are also the arguments to call the script) my @args = ('-a', $ENV{X},

Re: use strict and local variables

2006-10-16 Thread Rob Dixon
Raphael Brunner wrote: > > On Mon, Oct 16, 2006 at 07:36:13PM +0800, Jeff Pang wrote: >> >> Raphael Brunner wrote: >>> >>> eg: >>> >>> use strict; >>> my $var = 20; >>> >>> print "$var\n"; >>> &routine; >>> exit; >>> >>> >>> sub routine { >>>print "$var\n"; >>> } >>> >> >> Hi,you can do it by

Re: use strict and local variables

2006-10-16 Thread Jeff Pang
>eg: > >use strict; >my $var = 20; > >print "before: $var\n"; >&routine; >print "after: $var\n"; >exit; > > >sub routine { > $var += 1; >> >} > Hi,you don't need the global vars at all.The same way,you can write it like: use strict; my $var = 20; print "before: $var\n"; $var = routine($va

Re: use strict and local variables

2006-10-16 Thread Ricardo SIGNES
* Raphael Brunner <[EMAIL PROTECTED]> [2006-10-16T08:38:00] > But, my problem is, i must see this variable after the call of the sub. > I'm sorry for the first example, it was inaccurate. But this is ok (I > think) :) (because I have a lot of variables, which I must change in the > sub, I want to d

Re: use strict and local variables

2006-10-16 Thread Raphael Brunner
Thanks for your answer! But, my problem is, i must see this variable after the call of the sub. I'm sorry for the first example, it was inaccurate. But this is ok (I think) :) (because I have a lot of variables, which I must change in the sub, I want to define they as "global" inside my parent-rou

Re: use strict and local variables

2006-10-16 Thread Ovid
--- Jeff Pang <[EMAIL PROTECTED]> wrote: > Hi,you can do it by passing the vars to the subroutine like: > > my $var = 20; > &routine($var); > > sub routine { > my $var = shift; > print $var; > } > I'll second this recommendation because it makes the subroutines more flexible (what if th

Re: use strict and local variables

2006-10-16 Thread Jeff Pang
> >eg: > >use strict; >my $var = 20; > >print "$var\n"; >&routine; >exit; > > >sub routine { > print "$var\n"; >} > Hi,you can do it by passing the vars to the subroutine like: my $var = 20; &routine($var); sub routine { my $var = shift; print $var; } -- Books below translated by

use strict and local variables

2006-10-16 Thread Raphael Brunner
Dear Users is there a possibility to use "use strict" and to define variables in the programm, which are also seen in the subroutines called from this block? I want the same value in the var in the subroutine like before, but without it to define as global. What could I do? Thanks for all ideas a

Re: hwo to configure the Getopt:::STD options for command line arguments.

2006-10-16 Thread W.P.Nijhof
perl pra wrote: hi All, I have to call some perl scripts with command line arguements from another perl script. (some thing like this) perl -s -a $ENV{X} -b $ENV{Y} -c $ENV{Z} ; ( -a , -b, -c are also the arguments to call the script) ( the $ENV{x}=C:\xyz\abc,$ENV{Y}=abc,$ENV{Z}=5).

hwo to configure the Getopt:::STD options for command line arguments.

2006-10-16 Thread perl pra
hi All, I have to call some perl scripts with command line arguements from another perl script. (some thing like this) perl -s -a $ENV{X} -b $ENV{Y} -c $ENV{Z} ; ( -a , -b, -c are also the arguments to call the script) ( the $ENV{x}=C:\xyz\abc,$ENV{Y}=abc,$ENV{Z}=5). I understand we