RE: writing file in binary mode

2005-09-08 Thread Knight, Tommy
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jorge Palma Sent: Thursday, September 08, 2005 10:16 AM To: activeperl@listserv.ActiveState.com Subject: Fw: writing file in binary mode Sorry, here is the part where a write to the file. The problem is i

RE: wanting to use Win32::ODBC in a service

2005-09-08 Thread Kirk Batzer
Title: Message You may want to also look at SRVANY. This is a Windows RSK Tool that controls a stand-alone executable and let it run in the background as a service.  I've successfully used PerlApp to compile a perl script with Win32:odbc.    I've used both SQL Select and SQL Update logic w

RE: wanting to use Win32::ODBC in a service

2005-09-08 Thread Jan Dubois
Replacing “use” with “require” is not enough.  The body of the program file is still executed in the “other” thread.   As I wrote below, you would have to move the “require” statement *into* the Startup() callback.   Cheers, -Jan   From: [EMAIL PROTECTED] [mailto:[EMAIL PRO

RE: wanting to use Win32::ODBC in a service

2005-09-08 Thread supportserv
I didnt have much time to spend on this, this afternoon, but I did quickly replace "use" with "require" and no luck, still got the same results.  It is a pretty involved code, so I will make my way though it tomorrow, and make sure I not existing somewhere down in the code.  Thanks for your i

how to install modules on local pc

2005-09-08 Thread Ron
I don't have internet access due to security reasons. I want to update the repository to "C:\libPerl". I tried "set repository libPerl C:\libPerl but it cannot connect to it. does anyone know how to set the repository to a directory on the local C drive? Ron _

RE: wanting to use Win32::ODBC in a service

2005-09-08 Thread Jan Dubois
Your problem may be related to threading issues.  I believe Win32::ODBC is not thread-safe in the sense that all activity must happen in the same thread.   Under PerlSvc the script is compiled in one thread but actually runs in the context of another.  One way to try to get around this is

RE: wanting to use Win32::ODBC in a service

2005-09-08 Thread supportserv
Howard, I used the perlsvc to compile my script. The service is running on a windows server that is suppose to open a connection with an Oracle DB, and run a select statement once a minute, worked fine using DBI, but I cant keep the service running using  ODBC, it dies immediatly after running the

Re: Fw: writing file in binary mode

2005-09-08 Thread pDale
On 9/8/05, Jorge Palma <[EMAIL PROTECTED]> wrote: Sorry,here is the part where a write to the file.The problem is it write ok, but in text mode and not in binary mode.Thanks# --- open and read all text file and put it in arrayopen(FileIn,"$dirBase\\PSData_21.txt"), or die; @lines=;

Re: writing file in binary mode

2005-09-08 Thread pDale
On 9/8/05, Chris Snyder <[EMAIL PROTECTED]> wrote: Are you performing a chomp on each line read?  If not, then you will retainthe carriage return / line feed at the end of the data.  And if you areparsing the data, it could very well be stored in your variables. Try changing : @lines=;To:  

RE: wanting to use Win32::ODBC in a service

2005-09-08 Thread Bullock, Howard A.
All,  I have a script/service that was using the Oracle DBI, and I want to convert it over to using an ODBC connection. I got the script to compile as a svc. then when I started it, it fired correctly, but the service would not stay running while using the  Win32::ODBC, I am begining to wonder

Re: Fw: writing file in binary mode

2005-09-08 Thread $Bill Luebkert
Jorge Palma wrote: > Sorry, > here is the part where a write to the file. > > The problem is it write ok, but in text mode and not in binary mode. > > Thanks > > # --- open and read all text file and put it in array > open(FileIn,"$dirBase\\PSData_21.txt"), or die; > @lines=; >

RE: writing file in binary mode

2005-09-08 Thread Bowie Bailey
From: Jorge Palma [mailto:[EMAIL PROTECTED] > > here is the part where a write to the file. > > The problem is it write ok, but in text mode and not in binary mode. > > Thanks > > # --- open and read all text file and put it in array > open(FileIn,"$dirBase\\PSData_21.txt"), or die; >

RE: writing file in binary mode

2005-09-08 Thread Chris Snyder
Are you performing a chomp on each line read? If not, then you will retain the carriage return / line feed at the end of the data. And if you are parsing the data, it could very well be stored in your variables. Try changing : @lines=; To: for () { push @lines, c

wanting to use Win32::ODBC in a service

2005-09-08 Thread supportserv
All,  I have a script/service that was using the Oracle DBI, and I want to convert it over to using an ODBC connection. I got the script to compile as a svc. then when I started it, it fired correctly, but the service would not stay running while using the  Win32::ODBC, I am begining to wonder if

Re: writing file in binary mode

2005-09-08 Thread pDale
On 9/8/05, Jorge Palma <[EMAIL PROTECTED]> wrote: Hi All,   Does anyone can tell me if is possible write a file in binary mode? I'm working in windows.   I'm using the binmode function but it does'nt work. The script write the file in text mode. You do realize the only affect is 'print

Fw: writing file in binary mode

2005-09-08 Thread Jorge Palma
Sorry, here is the part where a write to the file. The problem is it write ok, but in text mode and not in binary mode. Thanks # --- open and read all text file and put it in array open(FileIn,"$dirBase\\PSData_21.txt"), or die; @lines=; close (FileIn); # --- open outfile in bi

Re: writing file in binary mode

2005-09-08 Thread $Bill Luebkert
Jorge Palma wrote: > Hi All, > > Does anyone can tell me if is possible write a file in binary mode? > I'm working in windows. > > I'm using the binmode function but it does'nt work. The script write the > file in text mode. Not possible. Create the smallest test snippet that proves your the

Re: writing file in binary mode

2005-09-08 Thread John W. Kennedy
Jorge Palma wrote: Hi All, Does anyone can tell me if is possible write a file in binary mode? I'm working in windows. I'm using the binmode function but it does'nt work. The script write the file in text mode. Thanks for the help. What is your code? What do you expect it to do? What

RE: writing file in binary mode

2005-09-08 Thread Brian Raven
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jorge Palma Sent: 08 September 2005 14:49 To: activeperl@listserv.ActiveState.com Subject: writing file in binary mode Hi All, Does anyone can tell me if is po

RE: writing file in binary mode

2005-09-08 Thread Bowie Bailey
From: Jorge Palma [mailto:[EMAIL PROTECTED] > > Does anyone can tell me if is possible write a file in binary mode? > I'm working in windows. > > I'm using the binmode function but it does'nt work. The > script write the file in text mode. It's hard to say why it's not working without seeing t

writing file in binary mode

2005-09-08 Thread Jorge Palma
Hi All,   Does anyone can tell me if is possible write a file in binary mode? I'm working in windows.   I'm using the binmode function but it does'nt work. The script write the file in text mode.   Thanks for the help. Best regards Jorge Palma ___

RE: Help for this type of combination of letter

2005-09-08 Thread Brian Raven
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of So Phal > Sent: 08 September 2005 09:36 > To: activeperl@listserv.ActiveState.com > Subject: Help for this type of combination of letter > > hi, everyone > > How to write a perl program to generat

Re: Help for this type of combination of letter

2005-09-08 Thread Mark Knoop
Not very graceful or the most efficient but it does the trick... # use strict; my @pool = ('A', 'B', 'C', 'D'); permute([(@pool)], []); sub permute { my @items = @{ $_[0] }; my @perms = @{ $_[1] }; unless (@items) { my $perm = join ('', (reverse(@perms))); print $pe

Help for this type of combination of letter

2005-09-08 Thread So Phal
hi, everyone How to write a perl program to generate the following combination of a letter ABCD ABCD ABDC ACBD ADBC ADCB ACDB BACD BADC BDAC BCAD BDCA BCDA CABD CADB CDBA CBAD CBDA CDAB DABC DBAC DACB DCAB DBCA DCBA I think it is possible to generate this letter, the rule is: ABCD 1*2*3*4