Re: DBI

2006-08-01 Thread Bjørge Solli
On Tuesday 01 August 2006 17:04, Greg Sabino Mullane wrote: > > use strict; > > use DBI; > > $sth->bind_param( 1, \$insertid, SQL_INT); #insertid from other > > insertion $sth->bind_param( 2, \$ap, SQL_DOUBLE); > > You need to tell DBI to import the SQL type constants. This is done by > rep

Re: Modify a line after occurance of a specific word?

2006-08-01 Thread John W. Krahn
The Other1 wrote: > Hi list, Hello, > I process a set of files and end up with a hash with server, > administrator pairs. I need to read in another file and modify (or add > if it does not exist) a line containing the word administrator following > the line with the server name. > > Hash pairs:

Modify a line after occurance of a specific word?

2006-08-01 Thread The Other1
Hi list, I process a set of files and end up with a hash with server, administrator pairs. I need to read in another file and modify (or add if it does not exist) a line containing the word administrator following the line with the server name. Hash pairs: Server1 Bob Server2 Chuck Server3

Re: AlphaX+Perl

2006-08-01 Thread Tom Phoenix
On 7/31/06, Peter Colapietro <[EMAIL PROTECTED]> wrote: Hi I am running Mac OS X Version 10.4.7 on my MacBook Pro. I downloaded Perl 5.8.8 and put it in /library/perl. You should already have had perl; it comes with Mac OS X. Did it pass all the tests before you installed it? I think I set

Perl Postgres Apache problem

2006-08-01 Thread Perlguru
Hi This works from command line but with Apache not, what configuration I have to change or do I need to do more users or rights? #!/usr/bin/perl # print "Content-type: text/plain\n\n" ; use DBI; use strict; my $dbh; my $sth; my @vetor; my $field; $dbh = DBI->connect('DBI:Pg:dbname=mydb', '

Re: ISBN lookup

2006-08-01 Thread Tristan Fiedler
Thank you for the reply. A bug in the module was also noted at http://www.perlmonks.org/?node_id=563895 tf On Aug 1, 2006, at 10:03 AM, Peter Scott wrote: On Wed, 26 Jul 2006 18:26:49 -0400, Tristan Fiedler wrote: Hello All, I posted the following on PerlMonks but have not found a solutio

Re: DBI

2006-08-01 Thread rahed
[EMAIL PROTECTED] (Bjørge Solli) writes: > Hi, > > I get an error message I don't understand. I've been following what I > thought was good practice when talking to a DB. > > use DBI; Import :sql_types tag. use DBI qw/:sql_types/; -- Radek -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addi

Re: Is this behavior not right?

2006-08-01 Thread JupiterHost.Net
Joshua Colson wrote: On Tue, 2006-08-01 at 11:38 -0500, JupiterHost.Net wrote: perl -mstrict -wle '$gl="why am I not throwing errors?";print $gl;' That should be a capitalized 'M': perl -Mstrict -wle '$gl="why am I not throwing errors?";print $gl;'\ Doh! Thanks Josh, I was hoping I was

Re: Is this behavior not right?

2006-08-01 Thread Joshua Colson
On Tue, 2006-08-01 at 11:38 -0500, JupiterHost.Net wrote: > perl -mstrict -wle '$gl="why am I not throwing errors?";print $gl;' That should be a capitalized 'M': perl -Mstrict -wle '$gl="why am I not throwing errors?";print $gl;' HTH -- Joshua Colson <[EMAIL PROTECTED]> -- To unsubscribe, e

Re: BASEDIR and BASENAME on Windows

2006-08-01 Thread JupiterHost.Net
BenBart wrote: Hi all, Can anyone please tell me how to get the BASENAME and BASEDIR of a file ... i.e. for example, if I have C:\Windows\Temp\Dir1\MyFile.TXT, I want to be able to get the BASENAME which is MyFile and the BASEDIR which is C:\Windows\Temp\Dir1 and assign them to variables .

Is this behavior not right?

2006-08-01 Thread JupiterHost.Net
I was surprised that strict and warnings didn;t hollor when I used a variable without my... $ perl -mstrict -wle '$gl="why am I not throwing errors?";print $gl;' why am I not throwing errors? $ What magic voodoo is going on here? I though you had to my $var w/ strict? -- To unsubscribe, e-mai

Re: if-clause again

2006-08-01 Thread Mumia W.
On 08/01/2006 08:13 AM, Dr. Claus-Peter Becke wrote: databaserequest_noun($col, $table, $case) is a self written function based on the dbi manual's proposals. here's the code: sub databaserequest_noun { my ($col,$table,$case) = @_; my $database = "lexikon"; my $hostname = "localhost"; my $dsn

Re: if-clause again

2006-08-01 Thread Tom Phoenix
On 8/1/06, Dr. Claus-Peter Becke <[EMAIL PROTECTED]> wrote: databaserequest_noun($col, $table, $case) is a self written function based on the dbi manual's proposals. here's the code: sub databaserequest_noun { ... $dbh->disconnect; } maybe anybody detects the reason why the return value become

Re: BASEDIR and BASENAME on Windows

2006-08-01 Thread Beginner
On 2 Aug 2006 at 3:24, BenBart wrote: > Hi all, > > Can anyone please tell me how to get the BASENAME and BASEDIR of a file > ... i.e. for example, if I have C:\Windows\Temp\Dir1\MyFile.TXT, I want > to be able to get the BASENAME which is MyFile and the BASEDIR which is > C:\Windows\Temp\Dir1

BASEDIR and BASENAME on Windows

2006-08-01 Thread BenBart
Hi all, Can anyone please tell me how to get the BASENAME and BASEDIR of a file ... i.e. for example, if I have C:\Windows\Temp\Dir1\MyFile.TXT, I want to be able to get the BASENAME which is MyFile and the BASEDIR which is C:\Windows\Temp\Dir1 and assign them to variables ... Thanks in adva

RE: How to get the information on the dynamic website?

2006-08-01 Thread Charles K. Clarkson
sewe_perl wrote: : Is there any method to get the information on the dynamic : website, such as php, jsp and so on. Yes, FTP. php is executed on the server and the result is sent over http. LWP fetches the result, not the source. HTH, Charles K. Clarkson -- Mobile Homes Specialist Free Ma

RE: DBI

2006-08-01 Thread Charles K. Clarkson
Bjørge Solli wrote: : I get an error message I don't understand. I've been following : what I thought was good practice when talking to a DB. Did you import those constants? use DBI qw(:sql_types); HTH, Charles K. Clarkson -- Mobile Homes Specialist Free Market Advocate Web Programmer

RE: if-clause again

2006-08-01 Thread Charles K. Clarkson
Dr. Claus-Peter Becke wrote: : maybe anybody detects the reason why the return value becomes 1 Perl returns values from subroutines implicitly and explicitly. A 'return' statement is used to send an explicit return. Otherwise, the return value of the last statement is returned implicitly. Exp

Re: DBI

2006-08-01 Thread Greg Sabino Mullane
> use strict; > use DBI; > $sth->bind_param( 1, \$insertid, SQL_INT); #insertid from other > insertion > $sth->bind_param( 2, \$ap, SQL_DOUBLE); You need to tell DBI to import the SQL type constants. This is done by replacing 'use DBI;' above with: use DBI qw(:sql_types); No

How to get the information on the dynamic website?

2006-08-01 Thread sewe_perl
Hello to all! Is there any method to get the information on the dynamic website, such as php, jsp and so on. It seems the LWP module can't work well, it just get the html part, and can't get the php(jsp...) part. I'm looking forward to your response, thank you in advance!

Re: if-clause again

2006-08-01 Thread Dr.Ruud
"Dr. Claus-Peter Becke" schreef: > databaserequest_noun($col, $table, $case) is a self written function > based on the dbi manual's proposals. here's the code: > > sub databaserequest_noun > { > my ($col,$table,$case) = @_ ; > my ($database, $hostname) = ('lexikon', 'localhost') ; > my

Re: validating SSHA pasword

2006-08-01 Thread WCJ d/b/a http://ccsh.us/
On 8/1/06, Beast <[EMAIL PROTECTED]> wrote: Using Digest::MD5 i could simply using "eq" to validating user password, but how do I validate SSHA since encrypted results are always different? Technicaly speaking a one-way hash is by definition one-way; however have you read this: http://search.c

Re: ISBN lookup

2006-08-01 Thread Peter Scott
On Wed, 26 Jul 2006 18:26:49 -0400, Tristan Fiedler wrote: > Hello All, > > I posted the following on PerlMonks but have not found a solution. > Could someone please comment on solutions to the following error. I am > using the Library of Congress driver to look up book info based on ISBN > n

DBI

2006-08-01 Thread Bjørge Solli
Hi, I get an error message I don't understand. I've been following what I thought was good practice when talking to a DB. All help/comments appreciated! Some code: 3 use strict; use DBI; ... open FILE, "${DIR}/$_" or die "Failed to open ${DIR}/$_"; $sql =

if-clause again

2006-08-01 Thread Dr. Claus-Peter Becke
databaserequest_noun($col, $table, $case) is a self written function based on the dbi manual's proposals. here's the code: sub databaserequest_noun { my ($col,$table,$case) = @_; my $database = "lexikon"; my $hostname = "localhost"; my $dsn = "DBI:mysql:database=$database; host=$hostname"; my $

RE: update statement execution in perl

2006-08-01 Thread Jerry DuVal
#!/usr/bin/perl use warnings; use strict; use DBI; my $username = 'test'; my $password = 'test'; my $database = 'testdb'; my $hostname = 'localhost'; my $dbh = DBI->connect("dbi:Pg:database=$database;"."host=$hostname;port=5432", $username, $password); my $SQL = "Select (select name from host w

validating SSHA pasword

2006-08-01 Thread Beast
Hello, Using Digest::MD5 i could simply using "eq" to validating user password, but how do I validate SSHA since encrypted results are always different? TIA --beast -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]