Wanted: Help with DBI/CGI in Windows 8.1/IIS

2014-06-25 Thread siegfried
aracter in column one and run it in IIS, internet explorer times out and complains about a bad header being returned. Can someone help me so I can incorporate DBI and microsoft access in my web page? Thanks Siegfried use DBI; use strict; use warnings; use POSIX; use CGI qw(:standard); use CGI::C

How to implement locks/gates/semaphores to alleviate race conditions?

2014-05-24 Thread siegfried
I have multiple processes running cygwin/bash that are accessing the same files in a certain directory.I want to create a lock or semaphore or gate to serialize access to this directory so that no two (or more processes) can access the directory at any one time. As soon as the first process running

How to parse C#, javascript, lisp source code for quoted literal strings

2014-05-22 Thread siegfried
I need to extract some information from source code.How can I write a perl regular _expression_ that will match a literal string in languages like C#, _javascript_, java and lisp?Here is my naive approach:/"[^"]*"/This of course does not accommodate backslashes in the string that perl, C, C# _javas

[FWD: Preprocessor for writing .SQL files for Oracle PLSQL and MS TSQL]

2013-01-29 Thread siegfried
uess I'll grab the recursive descent parser out of an antique edition of the camel book to evaluate my logic expressions. Anyone have any suggestions to make it easier? Can anyone help me get started? Thanks Siegfried -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additio

How to write console mode chat client

2011-09-11 Thread siegfried
This program works, except it does not echo its input from the socket immediately. Can someone modify the client for me so it will display what it reads from the socket immediately? Presently, I only get to see what it reads from the socket if it sees "exit". Thanks Siegfried #!c:/per

How to grab last element of array from split with no temporary variables?

2011-08-11 Thread siegfried
This works! Is there a way to do it with less typing? How can I do it without creating a temporary variable "@p"? Thanks, siegfried find /xyz -exec perl -e 'foreach(@ARGV){ my @p=split "/"; rename $_, "./$p[$#p].txt" } ' -- To unsubscribe, e-mail: begin

Wanted: Example of asynchronous bidirectional socket client (a socket chat program)

2011-07-27 Thread siegfried
d the other to block on the keyboard with $inp= (so it can print to the write socket when it receives input form the keyboard). Can the first thread print to the console if the second thread is blocking on $inp=? Surely, someone has posted source to such a beast somewhere on the internet! Thank

How to convert to array? Why so many parens?

2011-05-11 Thread siegfried
I have the same question about the =~ operator -- it returns an array too. So why cannot I just type print @{$a=~/([0-9]+)/}[0] ? Instead I have to type print (($a=~/([0-9]+/)[0]); Why are the extra outer parens required? Thanks, Siegfried -- To unsubscribe, e-mail: beginners-unsubscr...@pe

Alternatives to eval

2011-04-25 Thread siegfried
p, I would use the set function instead of the setq function to assign a value to a variable whose name is stored in a string. Is there a counterpart to the lisp set function in Perl? Siegfried -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: b

Wanted: Help inventing poor man's FTP server

2011-04-10 Thread siegfried
socket packet? I've only used print statements before. I could write a single record per the call to the socket send function. Is there a better way? (I hope so!) Recommendations are welcome! thanks, siegfried -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional comman

How to not hard code ?

2011-03-30 Thread siegfried
errors. What is the syntax? Is a file handle in perl? thanks, siegfried -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

perl -MCPAN -e "install Glib"

2011-03-16 Thread siegfried
ot;test_harness(0,"blib/lib", "blib/arch") ... tests that pass... t/9.t1/30 hang! This is the same symtom I see when I try to install Gtk directly. It will proceed if I hit "ctrl-c" and then tell me the installation fails. I tried using the force

Using perl to automate add user on linux/freebsd systems

2011-03-14 Thread siegfried
Does anyone know the perl API (presumably on CPAN) for useradd/userdel/usermod to automate the manipulation of users on FreeBSD systems? On Linux systems? thanks, Siegfried -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http

Threads and garbage collection

2011-02-23 Thread siegfried
fically say that). The code I inherited is running on FreeBSD. Since this is my second day on the job, I cannot log in yet to check the version numbers. Thanks, siegfried -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.o

Indexing return value from split directly without explicit temporary variable?

2010-09-30 Thread siegfried
? Here is my attempt: print (@{split "\\.", @ARGV[0]})[0]; How do I index directly without explicitly creating a temporary variable? Thanks, Siegfried

RE: How to convert UTF-8 to XML entities?

2008-08-20 Thread siegfried
Silly me! I should have anticipated the need to go back again! Can anyone give me a little script to search for XML entities and convert them to my choice of utf-8, utf-16 or utf-32? Thanks! Siegfried >> Does anyone have some perl (or emacs lisp) code that will convert the UTF-8 chinese t

How to convert UTF-8 to XML entities?

2008-08-15 Thread Siegfried Heintze (Aditi)
look like this: 安? Thanks! siegfried

how to reinvent "tar xvfz" with perl?

2008-07-22 Thread Siegfried Heintze (Aditi)
install. When I try activestate perl's ppm.bat I don't see an any modules when I search for gzip (except for one called CGI-WebGzip which did not look like what I wanted). Can someone help me reinvent "tar xvfz"? Thanks! Siegfried #!c:/perl/bin/perl # # $Log$ # # Begin commands t

RE: How to conditionally substitute in files?

2008-06-12 Thread Siegfried Heintze (Aditi)
Thanks John! I to edit it a little but it works! Can someone explain to why I have to remove the $ from $IN and $OUT and remove the "my" in "my $IN" and "my $OUT" to make it work? Thanks, Siegfried -Original Message- From: John W. Krahn [mailto:[EMAIL PROT

How to conditionally substitute in files?

2008-06-12 Thread Siegfried Heintze (Aditi)
This works: perl -i.bak -ple "s/class/xybpublicabc/g" Migration.cs However, when there are no matches, it still creates a new .bak file. How can we not change the date time on a file if there are no substitutions make?

How to command line perl mail client for Microsoft exhange?

2008-04-23 Thread Siegfried Heintze (Aditi)
SMTP server? Thanks, Siegfried

How to delete old directories with perl script?

2008-04-23 Thread Siegfried Heintze (Aditi)
re old (according to the above criteria) and delete them and their contents? What packages would you use? Thanks, Siegfried

How to ftp all the files?

2008-03-26 Thread Siegfried Heintze (Aditi)
p me modify my fragment above so it recursively fetches the entire directory? I was not sure how to pass that function pointer in the example in the documentation. 4. Is perl the best way to do this? Would it be easier in some other language/library like bash or python or ruby? Thanks! Siegfried

RE: FW: How to install Date::Manip on cygwin perl?

2008-03-21 Thread Siegfried Heintze (Aditi)
first. Brian: I see you are the author of CPAN. Do you have any suggestions? Scroll way down for the log where I reproduce it on windows/cygwin. Thanks, Siegfried -Original Message- From: Bob McConnell [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2008 1:08 PM To: Siegfried Heintze

RE: FW: How to install Date::Manip on cygwin perl?

2008-03-20 Thread Siegfried Heintze (Aditi)
McConnell -Original Message- From: Gunnar Hjalmarsson [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 18, 2008 3:37 PM To: beginners@perl.org Subject: Re: FW: How to install Date::Manip on cygwin perl? Siegfried Heintze (Aditi) wrote: > It looks like the CPAN program does not anticipate

RE: How to install Date::Manip on cygwin perl?

2008-03-18 Thread Siegfried Heintze (Aditi)
Can someone advise me as to where I should put the quotes? All I did was type perl -MCPAN -e 'install Date::Manip' Somewhere the is a perl script that needs to be edited. Can someone tell me what script this is? Thanks, Siegfried -Original Message- From: Mike Wohlrab [mai

FW: How to install Date::Manip on cygwin perl?

2008-03-17 Thread Siegfried Heintze (Aditi)
as a workaround! My apologies if this appears twice. Siegfried From: Siegfried Heintze (Aditi) Sent: Monday, March 17, 2008 12:42 PM To: '[EMAIL PROTECTED]' Subject: How to install Date::Manip on cygwin perl? It looks like the CPAN program does not anticipate paths with spaces in them.

RE: How to reinvent grep in perl?

2007-10-04 Thread siegfried
> >siegfried wrote: >> I need to search large amounts of source code and grep is not doing the job. >> The problem is that I keep matching stuff in the comments of the >> C++/Java/Perl/Groovy/Javascript source code. >> >> Can someone give me some hints on wher

How to reinvent grep in perl?

2007-10-03 Thread siegfried
contents of /* and */ comments? Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Wanted: perl script to download iso files from web page

2007-03-14 Thread siegfried
some other good perl script repositories somewhere? If I write my own, how might I reinvent wget? Thanks, Siegfried

How to revinent wget?

2007-03-14 Thread siegfried
not exist, can someone recommend a good set of packages and functions I would use to reinvent wget? Thanks, Siegfried

How to reinvent the linux "df" command

2007-02-16 Thread siegfried
Can someone suggest where I would look to reinvent "df" with perl? The "df" command enumerates all the drives and partitions and interrogates them for the amount of disk space total, used and available. Is there an OS neutral way to write this program? I hope so. If not, this will be running on xub

RE: How to manipulate environment variables in parent process?

2006-11-14 Thread siegfried
et up. Anytime I run a perl program that uses backquotes or system, those symbols that are defined by perl will only be good for duration of the perl program and as soon as perl exits, I'll have a command prompt with none of the new symbols defined -- correct? I believe this is true

How to manipulate environment variables in parent process?

2006-11-12 Thread siegfried
then I manually execute the bat file. I don't think there is anyway to automate the execution of the bat file. Please tell me I'm wrong! Thanks, Siegfried PS. The bat file just contains a lot of windows cmd.exe set commands.

RE: How to generate unique log file names for cron?

2006-08-09 Thread siegfried
cron? siegfried wrote: > I have daily cron jobs that clobber their old log files everyday. > > How can I automate keeping the last 3 log files and delete the oldest one > everyday? Are you using logrotate(8)? man logrotate -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

How to generate unique log file names for cron?

2006-08-09 Thread siegfried
Is there not a simpler way? Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Dynamically updating perl variables

2006-07-25 Thread siegfried
where I can label my values. Presently my file "delay.txt" looks like 1 1 And I would prefer it look like delay= 1; continue = 1; Thanks, Siegfried sub getDelay{ local *FILE; my $delay; my $continue; open (FILE,"delay.txt"); $delay = ; $continue = ; $delay =

Running perl from perl?

2006-05-23 Thread siegfried
a time. Perhaps I could have a "switch" statement to only "require" those modules that have been determined to be necessary for the oldest task. Is this the best way? Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EM

RE: How to prevent duplicate cron jobs? On windows?

2006-04-21 Thread siegfried
2:45 PM To: beginners@perl.org Subject: Re: How to prevent duplicate cron jobs? siegfried wrote: > I have a cron job running perl and it is taking a very long time -- > sometimes over 24 hours. > > How can I have cron schedule my job daily, or even hourly, and have the perl > code

How to prevent duplicate cron jobs?

2006-04-21 Thread siegfried
before proceding. But what if a cron job exits prematurely, perhaps because of a division by zero, and does not delete the /tmp file? How do I set up a signal handler to gaurentee that the /tmp/do_not_run_yet file gets deleted when the cron job exits? Thanks, Siegfried -- To unsubscribe, e-mail

When to use the begin statement?

2006-04-19 Thread siegfried
Apparently they are getting called anyway. The begin statement just gave me syntax errors. And what is the deal with @ISA? Is that not used for inheritance? What is the descendant class here? And what does __PACKAGE__ mean? Thanks, siegfried use vars '@ISA'; @ISA = 'LWP::UserAgent

RE: How to use proxy with LWP?

2006-04-19 Thread siegfried
Alan, This worked for me! Thanks, Siegfried #!c:/Perl/bin/Perl.exe # Begin commands to execute this file using Perl with bash # perl test-proxy.pl # End commands to execute this file using Perl with bash package test; require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw

Has anyone make CPAN's Java::Swing pass unit tests?

2006-04-16 Thread siegfried
x27; I would love to see this work. Where is swing.obj? I was expecting a swing.c or swing.xs but can find no such file. Thanks, Siegfried SET VCINSTALLDIR=\Program Files\Microsoft Visual Studio .NET 2003 SET MSVCDir=%VCINSTALLDIR%\VC7 SET FrameworkDir=\WINNT\Microsoft.NET\Framework SET FrameworkSDKDi

How to use proxy with LWP?

2006-04-14 Thread siegfried
I stole the following code fragment from an example program: use vars '@ISA'; @ISA = 'LWP::UserAgent'; my $agent= __PACKAGE__->new; Now I want to use a proxy and a search on CPAN to find http://search.cpan.org/~qjzhou/LWP-UserAgent-ProxyAny-1.02/ProxyAny.pm with some sample code (see below).

Which CPAN module to alter Win32 Access Control List (ACL)?

2006-04-13 Thread siegfried
everyone access to the actual database (which typically has a .mdb extension), you cannot to the mdl because it is created on demand. So after the administrator account opens a MSAccess database, which CPAN module do I use to allow others to access the newly created mdl file? Thanks, Siegfried

FW: Wanted: Help selecting XPath/XMLDom/HTML parser

2006-04-08 Thread Siegfried Heintze
Let me try this again now that I am subscribed to the list! -Original Message- From: Siegfried Heintze [mailto:[EMAIL PROTECTED] Sent: Saturday, April 08, 2006 12:03 PM To: 'Perl Beginners' Subject: Wanted: Help selecting XPath/XMLDom/HTML parser Which module will load raw H

Wanted: Help selecting XPath/XMLDom/HTML parser

2006-04-08 Thread Siegfried Heintze
Which module will load raw HTML into a XMLDom so I can query it with Xpath? I can find HTML parsers and XML parsers but I'm having trouble finding an HTML DOM (not SAX) parser that accepts Xpath queries. Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comman

How to use IP Address from VPN instead of Primary?

2006-04-05 Thread Siegfried Heintze
instead of my primary? Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

RE: Where is the source code?

2006-01-02 Thread Siegfried Heintze
might make Data::UUID install? This happens to me a lot. I'm running activestate perl 5.8.7 on Win2003 Server. Thanks, Siegfried $ make cp UUID.pm blib/lib/Data/UUID.pm AutoSplitting blib/lib/Data/UUID.pm (blib/lib/auto/Data/UUID) /usr/bin/perl.exe /usr/lib/perl5/5.8/ExtUtils/xsubpp -typemap

Where is the source code?

2006-01-02 Thread Siegfried Heintze
guids/uuids. Any information on this will be welcomed (but it might be a little off topic). Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Which Module for XPath on HTML?

2005-11-04 Thread Siegfried Heintze
I'm looking at CPAN searching for XPath and feeling lost. In Java I can use jtidy to read html into a standard XML DOM (org.w3c.dom to be exact) and search that DOM with Xpath. Can I do that in perl? If so, which modules do I want? Thanks, Siegfried -- To unsubscribe, e-mail: [

Which logger do I want? Or write my own? How?

2005-11-03 Thread Siegfried Heintze
be an effective logger? I don't think I want guaranteed delivery, however. I would like the option of not running the client. Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

MSAccess Problem solved (was RE: Simultaneous access: Perl (DBD::ODBC) and C# (ODBC))

2005-10-29 Thread Siegfried Heintze
't be able to access the temporary ldb file created by the first user. My solution is to have everyone use the same account. This works because in my situation, one user is a web server and the other user is a batch job that runs every couple of hours. Siegfried -Original Message

Simultaneous access: Perl (DBD::ODBC) and C# (ODBC)

2005-10-20 Thread Siegfried Heintze
ould not use ''; file already in use. To summarize: it always works fine with perl reader. It works fine with C#/ASPX reader and no simultaneous access. It breaks when perl is INSERTing/SELECTing and C#/ASPX is SELECTing. I guess this is really a Microsoft ADO problem but I'm out of id

How do I create async child process?

2005-10-14 Thread Siegfried Heintze
Is there a vendor neutral way to create an asynchronous child process in perl? I know the back quotes create a synchronous one but I want multiple asynch child processes. Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <h

OS Vendor Neutral way to Join Process

2005-10-04 Thread Siegfried Heintze
There is a "join" feature for threads. Is there an OS Vendor neutral way to create multiple processes executing simultaneously with the parent and have the parent "join" on them like I can with threads? Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For ad

How to enumerate modules loaded?

2005-10-01 Thread Siegfried Heintze
How can I enumerate the file names of all the perl modules that are loaded in the current perl program? Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

RE: Where is the data I just inserted?

2005-09-19 Thread Siegfried Heintze
Problem found! Thanks for your help! The problem was that I was trying to store a string that was longer than the field definition in the database. When I adjusted the field length in the database, that fixed the problem! Hurray! Thanks again, Siegfried -Original Message- From

RE: Where is the data I just inserted?

2005-09-19 Thread Siegfried Heintze
-Original Message- My code with line numbers is below. Without line numbers is in the attachment. Thank you very much for taking an interest in my problem! The problem does not seem to occur for smaller records. Siegfried From: Charles K. Clarkson [mailto:[EMAIL PROTECTED] Sent

Where is the data I just inserted?

2005-09-18 Thread Siegfried Heintze
nclosing the "INSERT" and "SELECT MAX" in $dbh->begin_work and $dbh->commit but that did not help. The "INSERT" is successful, I can see it there. Why cannot I not find it? The "WHERE" clause I'm using with the "SELECT" is a sub set

RE: extract web pages from a web site

2005-09-15 Thread Siegfried Heintze
the HTML and it sounds like you are not interested in that part. I looked at WWW::Mechanize and was dismayed because it looked like it was extremely specific. It only had a few functions and was not general purpose. Siegfried -Original Message- From: Scott R. Godin [mailto:[EMAIL PROTECTED]

How to store more than 255 characters in a single field in MSAccess

2005-09-14 Thread Siegfried Heintze
characters and I am reluctantly truncating it. Anyone got any ideas? Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

RE: Can I alter the system wide @INC array?

2005-09-14 Thread Siegfried Heintze
rlink and text. None of these seem capable of storing character strings longer than 255 (which is strange because the documentation says to use memo instead of text when you need to store more than 255 characters). My URL is 403 characters and I am reluctantly truncating it. Anyone got any ideas

Programmatically Creating MSAccess Databases?

2005-08-30 Thread Siegfried Heintze
[Siegfried Heintze] Where would I start looking to find the modules that would allow me to programmatically create a MSAccess database? I looked in Win32::ODBC but no luck there. Microsoft has three different ways (APIs) to do this (kinda like the perl slogan): DAO, ADOX and some function that

Packages for writing screen scrapers

2005-08-19 Thread Siegfried Heintze
[Siegfried Heintze] I've been using HTML::Parser with MySQL and I've had a lot of problems with (both RAM and disk) memory leaks and multi-threading. I was really disappointed, for example, discover that having multiple threads did not really speed things up at all. I wonder if HTML::Par

RE: How to use % in MySQL SQL statement from Perl?

2005-07-22 Thread Siegfried Heintze
Thanks Tom, I tried your suggestion but no luck. Still no results. I'm running 4.0.23 of MySQL and 8.4+ of ActiveState. I wonder if this is a bug in DBI? Siegfried -Original Message- From: Tom Allison [mailto:[EMAIL PROTECTED] Sent: Thursday, July 21, 2005 8:08 PM To: Siegfried He

How to use % in MySQL SQL statement from Perl?

2005-07-21 Thread Siegfried Heintze
range with that "%", but I cannot figure it out. Anyone got any suggestions? Siegfried my $sJobTitle = q[SELECT sName FROM keywords ORDER BY sName WHERE sName LIKE '%']; $sJobTitle = q[SELECT sName FROM keywords ORDER BY sName]; my $sth = DBH->prepare($sJobTitle);

How to pass back information to shell

2005-07-15 Thread Siegfried Heintze
that I think should print "64" but does not: x=8; echo "`perl -e ' print $ARGV[0]; $ARGV[0]**2; ' $x`" I guess I need some bash help too. The loop I guess would look something like this: x=8; while $x; do; x=`perl -e ' print $ARGV[0]; $ARGV[0]--; ' $x`&

How to programmatically exit Tk::MainLoop?

2005-07-13 Thread Siegfried Heintze
How do I programmatically and gracefully exit a TK GUI program? I was looking for a close function for MainWindow, but could find none. Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/>

Atmoic operations in Multi-threaded Perl?

2005-07-06 Thread Siegfried Heintze
to integer by adding zero. This would mean that an auto-increment is probably not atomic. What about a string copy: is that atomic? Thanks, Siegfried

RE: Microsoft Access storing images?

2005-07-02 Thread Siegfried Heintze
r SQL statement. Have you tried that? I looked at the Win32::ODBC interface in the book "Programming the Perl DBI" and I did not see a way to bind -- which is surprising. But you can certainly do it, and it is recommended, with the DBI interface. Try it and let us know the results. Siegfri

What does *{"$callpkg\::$_"} = \&{"$pkg\::$_"} mean and how do I fix it?

2005-06-29 Thread Siegfried Heintze
do? What is the \:: for? Why the quotes? (2) Am I doing something wrong? My program seems to work. What should I change? Thanks again, Siegfried Below is the full code.

How to plug memory leak?

2005-06-19 Thread Siegfried Heintze
that I am indeed executing that statement, but my machine remains very sluggish until I exit the program. I have to restart the program frequently. Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/>

Wanted: example of perl code embedded in HTML in Internet Explorer

2005-06-18 Thread Siegfried Heintze
I know it is possible to do this (see title). Does ActiveState perl automatically install the Perl interpreter as COM object that is compatible with Internet Explorer? If not, how do I do it? Anyone have some sample code or a URL? Thanks, sieg -- To unsubscribe, e-mail: [EMAIL PROTECTED] For add

Perpare statements v. Interpolated SQL in DBI/MySQL: Does prepare really help?

2005-06-17 Thread Siegfried Heintze
ments effectively. Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

How to figure date of Sunday? Favorite Date/Time packages

2005-06-17 Thread Siegfried Heintze
Given the current date, I want to compute the date of the Sunday before. There are a lot of date packages on CPAN. Can someone recommend one that would be well suited for this calculation? Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

RE: Argument passing between perl and a C function.

2005-06-07 Thread Siegfried Heintze
J, I forgot to mention something important: your perl code is sending a SAFEARRAY. Perl creates and sends a SAFEARRAY when you create a variant with VT_ARRAY. However, you are not receiving variants containing SAFEARRAYs in your C/C++. Good luck. Siegfried -Original Message- From

RE: Argument passing between perl and a C function.

2005-06-07 Thread Siegfried Heintze
you, for example. Good luck, Siegfried -Original Message- From: Japerlh [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 07, 2005 1:23 AM To: Siegfried Heintze Cc: beginners@perl.org Subject: Re: Argument passing between perl and a C function. Sieg, Thanks for your help. I did not catch what

How to use qr to eliminate redundant code

2005-06-07 Thread Siegfried Heintze
ne edit this code to use the variable $pRole instead of multiple occurrences of /Assistant|Executive|Senior/? Thanks, Siegfried #!c:\Perl\bin\perl.exe # Begin commands to execute this file using Perl with bash # ./test.pl # End commands to execute this file using Perl with bash my $sJobTit

RE: Argument passing between perl and a C function.

2005-06-06 Thread Siegfried Heintze
ailto:[EMAIL PROTECTED] Sent: Friday, June 03, 2005 12:05 AM To: Siegfried Heintze Cc: beginners@perl.org Subject: Re: Argument passing between perl and a C function. Siegfried, Thank you. I am sure it's a dispatch interface. On 6/3/05, Siegfried Heintze <[EMAIL PROTECTED]> wrote:

Search Pattern Question: What does # mean?

2005-06-05 Thread Siegfried Heintze
I'm using regular expressions to parse job titles and I had C# in a pattern and it was not working correctly. I corrected the problem with C\#. What does C# match? Thanks, Sieg -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

HOw to pass patterns as function argments?

2005-06-05 Thread Siegfried Heintze
{ my $s = shift; my $old = shift; my $new = shift; while ($s =~ s/$old/$new/g) { } &abc(" long string here ", "here", "hear"); or Strategy B # not sure how to write the sub... &abc(" long string here", /here/, /hear/); Thanks again, Sie

Pattern Question: One or both, but not neither

2005-06-03 Thread Siegfried Heintze
Can I write a pattern that matches "Tampa" or "Florida", or "Tampa Florida"? Thanks, Siegfried -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED] Sent: Friday, June 03, 2005 8:44 AM To: Jay Savage Cc: Perl Beginners List Subjec

Search Pattern for Roman Numerals?

2005-06-02 Thread Siegfried Heintze
How do I write a pattern for removing roman numerals? The first 10 is enough. Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

RE: Seaching for Words at the beginning of the line and end of line

2005-06-02 Thread Siegfried Heintze
e an easier way? Thanks, Siegfried -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED] Sent: Thursday, June 02, 2005 7:04 PM To: Siegfried Heintze Cc: beginners@perl.org Subject: Re: Seaching for Words at the beginning of the line and end of line On Jun 2, Siegfried

RE: Argument passing between perl and a C function.

2005-06-02 Thread Siegfried Heintze
oblem. Not even microsoft's most recent languages, VB.NET and C# can consistently call custom interfaces. I would not want to try to do so directly in perl. Siegfried -Original Message- From: J aperlh [mailto:[EMAIL PROTECTED] Sent: Thursday, June 02, 2005 7:59 PM To: Siegfried

Seaching for Words at the beginning of the line and end of line

2005-06-02 Thread Siegfried Heintze
How do I search for the word "intern" without searching for "internal"? What I have been doing is /intern[^a]/ but that won't match /intern$/. Thanks, Siegfried

Favorite packages for benchmarking?

2005-06-02 Thread Siegfried Heintze
make subtraction faster. After I subtract two absolute times, then I want to display them in seconds. Thanks, Siegfried

RE: A question about Win32:OLE

2005-06-02 Thread Siegfried Heintze
search. S -Original Message- From: J aperlh [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 01, 2005 9:08 PM To: Siegfried Heintze Cc: beginners@perl.org Subject: Re: A question about Win32:OLE Thanks for your help. I can find it in regedit. I have to find it out in OLE/COM Object

RE: Argument passing between perl and a C function.

2005-06-02 Thread Siegfried Heintze
J, You need more information about the function that is contained in the IDL or the type library. Unfortunately, not all COM objects have an IDL file or type library. Both the IDL file and the type library would tell us exactly what the "*" means in C because it is ambiguous. The "*" could mean we

RE: A question about Win32:OLE

2005-06-01 Thread Siegfried Heintze
;Visible = $true; When you release the application, the application (and its window, of course) is supposed to shut down but it does not. So maybe your application misbehaves in the same manor. There may be a function you can call like quit, or exit that will make the application shut down. Siegfrie

RE: A question about Win32:OLE

2005-05-31 Thread Siegfried Heintze
You can use regedit too. The OLE/COM Object Viewer is the favorite. Well, actually, the documentation/tutorial for the function you are trying to call is the favorite. If you know the CLSID, you can call a function like CLSIDtoString (or something like that) to get the progid. Siegfried

RE: Perl syntax questions from source code in queue.pm

2005-05-19 Thread Siegfried Heintze
on? This works for me on windows. Siegfried #!c:/Perl/bin/Perl.exe use strict; use warnings; # Begin commands to execute this file using Perl with bash # ./test-threads.pl # End commands to execute this file using Perl with bash use threads; use threads::shared; use Thread::Queue; us

Questions on Perl Syntax from queue.pm

2005-05-18 Thread Siegfried Heintze
that did not work either. Both my code and Larry's hang on this dequeue function, even when there is something in the queue. 73 sub dequeue { 74 my $q = shift; 75 lock(@$q); 76 cond_wait @$q until @$q; 77 cond_signal @$q if @$q > 1; 78 return shift @$q; 79 }

Perl syntax questions from source code in queue.pm

2005-05-18 Thread Siegfried Heintze
dequeue { 74 my $q = shift; 75 lock(@$q); 76 cond_wait @$q until @$q; 77 cond_signal @$q if @$q > 1; 78 return shift @$q; 79 } Thanks, Siegfried

Thread queues don't seem to dequeue!

2005-05-17 Thread Siegfried Heintze
Thread starting" message, however. The async statement works too. Can someone tell me why I cannot dequeue? Thanks, Siegfried use Thread::Queue; use Thread 'async'; my $cThreads = 4; my $nThreads = 0; my @Q; my @aThreads; foreach (0..$cThreads-1){

RE: How to install Gtk2 on Windows XP Pro/ActiveState 5.8+?

2005-05-14 Thread Siegfried Heintze
at worked. I typed nmake test and it complained that gnome-config not found. Gnome sounds like something from Linux What am I doing wrong? Thanks, Siegfried -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of zentara Sent: Monday, May 09, 2005 3:39 A

RE: Advise me? Seeking GUI toolkit...

2005-05-14 Thread Siegfried Heintze
this also the page for my >1st open-source project: Gtk2::Ex::DBI ... What is this DBI for? What is wrong with the other DBI implementations? Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

How to install Gtk2 on Windows XP Pro/ActiveState 5.8+?

2005-05-08 Thread Siegfried Heintze
I type $ perl -MCPAN -e 'install "Gtk2"' I get these errors (below). Can someone tell me what I am doing wrong? Thanks, Siegfried CPAN.pm: Going to build T/TS/TSCH/Gtk2-1.081.tar.gz Can't locate ExtUtils/Depends.pm in @INC (@INC contains: c:/P

Wanted: Help fixing Failing Installation Tests for Java::Swing

2005-05-08 Thread Siegfried Heintze
ectory but it is not finding it there. Do you know why? The tests for Inline::Java succeeded so I think the STUDY feature works. It should find it but it is not! Can anyone tell me why the install test failed and how to fix it? Below is the exact error message. Thanks, Siegfried t\0

  1   2   >