Re: Warning: Use of uninitialized value

2010-02-01 Thread Bob Williams
Uri Guttman wrote: BW == Bob Williams n...@spam.barrowhillfarm.org.uk writes: BW Hi Rob, Many thanks. That does what I want :) Now I need to study BW your code to learn why. and you need to learn to bottom post. you wrote one line and quoted 80 lines which have already been seen by

newline problem

2010-02-01 Thread Michom
HI, I am new to perl and I have written a smal script to grab data from one file, and put them into another file. The problem is new lines, which are printing nice under a linux environment, but it is all messed up if I open it with notepad. I am running Perl 5 under cygwin. Heres the script:

AW: newline problem

2010-02-01 Thread Thomas Bätzler
Michom michel.makhlo...@gmail.com asked: I am new to perl and I have written a smal script to grab data from one file, and put them into another file. The problem is new lines, which are printing nice under a linux environment, but it is all messed up if I open it with notepad. I am running

Re: newline problem

2010-02-01 Thread Shawn H Corey
Michom wrote: open (WRITE, rel.txt) || die Can't find rel.txt\n; Try: open my $write_fh, ':crlf', rel.txt or die could not open rel.txt: $!\n; You will have to change WRITE to $write_fh in the rest of the code. -- Just my 0.0002 million dollars worth, Shawn Programming is as much

Re: newline problem

2010-02-01 Thread John W. Krahn
Michom wrote: HI, Hello, I am new to perl and I have written a smal script to grab data from one file, and put them into another file. The problem is new lines, which are printing nice under a linux environment, but it is all messed up if I open it with notepad. I am running Perl 5 under

prepare(SELECT ... FROM TABLE) error

2010-02-01 Thread Tony Esposito
when the table does not exist the prepare fails.  How do ignore the error thrown by the prepare() and catch it later in the program?     my $dbh = DBI-connect(dbi:ODBC:mysql   ,$login ,$passwd ,{ RaiseError = 0 }  

Re: prepare(SELECT ... FROM TABLE) error

2010-02-01 Thread 7
On Mon, Feb 1, 2010 at 12:11 PM, Tony Esposito tony1234567...@yahoo.co.ukwrote: when the table does not exist the prepare fails. How do ignore the error thrown by the prepare() and catch it later in the program? my $dbh = DBI-connect(dbi:ODBC:mysql ,$login

Re: prepare(SELECT ... FROM TABLE) error

2010-02-01 Thread Tony Esposito
Is this the idea? I do not ever want to catch the error from the prepare statement itself -- I want my code to catch and throw the error.  And I am using Perl 5.8 so I do not need the use 5.010; pragma   thx  use strict; use warnings; use 5.010;  eval { my $sth = $dbh-prepare(SELECT

Re: prepare(SELECT ... FROM TABLE) error

2010-02-01 Thread Tony Esposito
Also, if prepare fails, I want to continue processing -- hence the need to capture the error in my code and not have DBI::DBD throw and exception then stop all processing ... --- On Mon, 1/2/10, Tony Esposito tony1234567...@yahoo.co.uk wrote: From: Tony Esposito tony1234567...@yahoo.co.uk

Re: Warning: Use of uninitialized value

2010-02-01 Thread Rob Dixon
Bob Williams wrote: Uri Guttman wrote: BW == Bob Williams n...@spam.barrowhillfarm.org.uk writes: BW Hi Rob, Many thanks. That does what I want :) Now I need to study BW your code to learn why. and you need to learn to bottom post. you wrote one line and quoted 80 lines which have

Re: Different approaches for Daemon and fork/thread

2010-02-01 Thread Peter Scott
On Mon, 01 Feb 2010 01:26:23 -0600, Alvaro Mantilla Gimenez wrote: I need to create a perl daemon that split in two process (each has different data input) and then they split in as many child (fork)/threads as need it. Daemon |