IO::Select perl question

2006-04-06 Thread assistent
Hi All! I am trying to use pipes in win32 in my main program (in C) I have: FILE *fd = _popen(perl d:/umts/catch_in.pl , wb); int i=12; fwrite((void*)i,1,4,fd); ie=fflush(fd); _pclose(fd); my perl code (in catch_in.pl) is : - use strict; use warnings;

RE: :Select perl question

2006-04-06 Thread John Serink
You can't. IO::Select with pipes and file handles is only supported on Unix. IO::Select on Win32 only works with Sockets. Cheers, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, April 06, 2006 2:10 PM To:

Re: IO::Select perl question

2006-04-06 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: Hi All! I am trying to use pipes in win32 ... This works ok. But with uncommented cycle prog catch_in.pl hangs ! My question is - why can_read always return empty array in spite of fact that there are data ready for read ??? P.S. I tried can_read() also It's

RE: Want to reduce the speed of execution in Perl script.

2006-04-06 Thread Yekhande, Seema \(MLITS\)
In this below example, I want to transfer the output of one file to the other file for reading and then take the average of every column. Do you have any idea about why column_average function doesn't works when multiple files Are passed using the for routine? #!/usr/bin/perl -w use fileoprn

RE: Efficiency

2006-04-06 Thread Thomas, Mark - BLS CTR
$last{substr($_,0,4)}=$_ for @myArray; print join \n, sort values %last; Whoops, one thing wrong with this ... since you don't sort before creating your hash, if the order of the data was such that the newer version appears earlier in the array, your results are wrong. Anyway

RE: Want to reduce the speed of execution in Perl script.

2006-04-06 Thread Thomas, Mark - BLS CTR
Yekhande, Seema (MLITS) wrote: Do you have any idea about why column_average function doesn't works when multiple files Are passed using the for routine? ... sub column_average { my ($idx) = @_; my $sum = sum map {$_-[$idx] if defined $_-[$idx]} @data; return $sum; } This

Adding custom Perfomance Counters

2006-04-06 Thread Артем Аветисян
Hi, all. There is Win32::PerfLib. It works fine for getting existing perfomance counters, but probably lacks for the ability to create your own. Is there a way to manipulate Perfomance Counters in such way? Thanks, Artem A. Avetisyan. ___

Connecting to DB2 on an AS/400 from windows

2006-04-06 Thread Jason Rice
I have a potential project which may need to connect to DB2 on an AS/400. They want the app to run on windows. They use 'client access' on their windows machines to connect to the system. I have not worked with AS/400 systems before so my first question is does the DBD::DB2 package support using

ot - cgi perl processes

2006-04-06 Thread Hon Shi
Yah, ot I know, but who else writes CGIs but perl guys? :-) However, the CGI model has an important drawback: a web server that wants to use a CGI program must call a new copy in responce to every incoming web request. With respect to perl, is that still true?

RE: Finding duplicate string in a set of files and sections

2006-04-06 Thread Peter Eisengrein
Thanks Peter, that will help. I am wondering if the use of anonymous hash and array may make more sense here than doing a bunch of `grep`. Can somebody show me how I would use it here? This isn't anonymous, but here's how I'd tackle it: ### untested my %dups; my %totaldups; foreach my

RE: Finding duplicate string in a set of files and sections

2006-04-06 Thread Paul
Thanks Peter, that's basically what I was looking, something more than the single hash I had. Now I have to figure what goes in these two lines $page++ if /some page match here/; $section++ if /some section match here/; But with some effort I should figure it out. --- Peter

RE: Finding duplicate string in a set of files and sections

2006-04-06 Thread Paul
Thanks Peter, that's basically what I was looking, something more than the single hash I had. Now I have to figure what goes in these two lines $page++ if /some page match here/; $section++ if /some section match here/; But with some effort I should figure it out. --- Peter

CGI OR NOT

2006-04-06 Thread So Phal
Hi I want to know whether using CGI and using pain html is faster or what? If I use CGI to generate the html and write pain html code inside Perl to generate Html. I believe write pain html inside Perl is more faster then CGI generate html code. What do you think ? -- May GOD blesses you, and

Re[2]: ot - cgi perl processes

2006-04-06 Thread Christopher Taranto
Hi Hon, Thursday, April 6, 2006, 12:29:09 PM, you wrote: HS Yah, ot I know, but who else writes CGIs but perl guys? :-) HS However, the CGI model has an important drawback: a web server that wants HS to use a CGI program must call a new copy in responce to every incoming HS web request. HS

RE: Finding duplicate string in a set of files and sections

2006-04-06 Thread Paul
Thanks Peter, that's basically what I was looking, something more than the single hash I had. Now I have to figure what goes in these two lines $page++ if /some page match here/; $section++ if /some section match here/; But with some effort I should figure it out. --- Peter

PROBLEM: MainWindow and system

2006-04-06 Thread Maximilian Thiel
Hi, when I use Tk::MainWindow(..) with system(..) the system-call slows down. In Debug-Mode (Komodo) the last line will never be reached!!! Example: use Tk; MainWindow-new(-height = 1)-messageBox(-message ='Hallo '); system(dir); print Never comes to