How to convert UTF-8 to XML entities?

2008-08-15 Thread Siegfried Heintze (Aditi)
I did a little google searching and found http://perl-xml.sourceforge.net/faq/#encoding_conversion. This does not look like it would work for multi-byte Chinese characters. Does anyone have some perl (or emacs lisp) code that will convert the UTF-8 chinese text in my XML file to entities that

how to reinvent tar xvfz with perl?

2008-07-22 Thread Siegfried Heintze (Aditi)
I need to automate some stuff and decided to use perl. I have cygwin perl and activestate perl. Below is my attempt. It does not work because I don't have perlIO::gzip installed. When I tried /bin/Perl -MCPAN -e 'install PerlIO::gzip' The tests fail and it won't install. When I try

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?

RE: How to conditionally substitute in files?

2008-06-12 Thread Siegfried Heintze (Aditi)
1:08 PM To: Perl Beginners Subject: Re: How to conditionally substitute in files? Siegfried Heintze (Aditi) wrote: 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

How to delete old directories with perl script?

2008-04-23 Thread Siegfried Heintze (Aditi)
I have directory names in the format of -mm-dd_hh-mm-ss. Sometimes I want to delete all the non-empty directories that are from last week or earlier. Other times I want to delete all the directories that are over a week old. Is there a script out there already that does this? Assuming the

How to command line perl mail client for Microsoft exhange?

2008-04-23 Thread Siegfried Heintze (Aditi)
I started installing Mail::Sender, Mail::Send and Mail::Util and discovered it is prompting me for a default SMTP server as part of the installation server. Well I go to outlook and view my account settings and discover that I'm connect to an exchange server. Is that what I specify for my SMTP

How to ftp all the files?

2008-03-26 Thread Siegfried Heintze (Aditi)
I'm using perl 5.8.8 on cygwin/windows 2003 server. This worked (but it was so tedious!): $ perl -MNet::FTP -e '$ftp =Net::FTP-new(mediaftp.wiley.com, Debug=0) or die cannot connect; $ftp-login(download,download) or die cannot login; $ftp-cwd(/product_ancillary/76/04701913/DOWNLOAD/) or die

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)
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 paths with spaces in them. So

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

2008-03-17 Thread Siegfried Heintze (Aditi)
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. I did a google search

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 commands,

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 HTML

How to use IP Address from VPN instead of Primary?

2006-04-05 Thread Siegfried Heintze
I'm using the LWP, HTML::Parser, HTTP::Request::Common and other packages retrieve some infromation from some web sites which require I have a certain IP address. I'm using a VPN to connect to this network. How can I tell perl to use the secondary IP address aquired by means of the VPN instead of

Where is the source code?

2006-01-02 Thread Siegfried Heintze
I'm trying to understand the algorithm for generating uuids or guids. I was hoping to use my perl debugger to single step thru the algorithm that creates guids/uuids. So I downloaded the tar.gz files at http://search.cpan.org/src/AGOLOMSH/Data-UUID-0.11/UUID.pm

RE: Where is the source code?

2006-01-02 Thread Siegfried Heintze
Sorry, I lied. I guess there is source code for Data::UUID but I cannot get it to work on windows. I tried ppm install Data::UUID and it could not find it. I tried downloading and following the instructions in the README me but that produced a lot of syntax errors. Can someone suggest how I

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: [EMAIL

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

2005-11-03 Thread Siegfried Heintze
I have a couple of batch jobs that run every couple of hours. They scrape web sites and populate an MSAccess database. I would like to write a GUI to monitor them. Presently all my diagnostic print statements just scroll by and they are very hard to read. I would not want the batch processes to

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

2005-10-20 Thread Siegfried Heintze
I'm using perl on a windows machine. I have a perl batch process populating an MSAccess database and a ASPX C# front end reading from the (same) MSAccess database. The ASPX/C# works fine as long as there is not a perl program trying to populate the database. If there is a perl program populating

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]

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 additional commands,

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
: Monday, September 19, 2005 7:03 AM To: beginners@perl.org Subject: RE: Where is the data I just inserted? Siegfried Heintze mailto:[EMAIL PROTECTED] wrote: : I'm using the DBI with ODBC on MS Access. : : I perform a SELECT. If this fails to find anything, I perform an : INSERT and SELECT MAX(id

RE: Where is the data I just inserted?

2005-09-19 Thread Siegfried Heintze
: Siegfried Heintze [mailto:[EMAIL PROTECTED] Sent: Monday, September 19, 2005 9:22 AM To: beginners@perl.org Subject: RE: Where is the data I just inserted? -Original Message- My code with line numbers is below. Without line numbers is in the attachment. Thank you very much for taking

Where is the data I just inserted?

2005-09-18 Thread Siegfried Heintze
I'm using the DBI with ODBC on MS Access. I perform a SELECT. If this fails to find anything, I perform an INSERT and SELECT MAX(id). Then I perform the exact same SELECT statement that I first performed and it does not find what I just inserted. Argghhh! I tried enclosing the INSERT and

RE: extract web pages from a web site

2005-09-15 Thread Siegfried Heintze
I recommend Lincoln Stein's book Perl Networking. Even if you are too cheap to buy his book, you can google for it and download the source code for an example program that uses HTML::Parser to extract and download all the gif files from a page. His example actually parses the HTML and it sounds

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

2005-09-14 Thread Siegfried Heintze
I'm using the perl DBI to populate a MSAccess database. I've spent all morning discovering that I cannot store a URL longer than 255 characters. I'm using the bind_param function and I get an error when it is longer. I've tried changing it (the field type) to type memo, hyperlink and text. None

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

2005-09-14 Thread Siegfried Heintze
Sorry, that last message was sent out with the wrong subject! I'm using the perl DBI to populate a MSAccess database. I've spent all morning discovering that I cannot store a URL longer than 255 characters. I'm using the bind_param function and I get an error when it is longer. I've tried

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

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::Parser

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 Heintze

How to use % in MySQL SQL statement from Perl?

2005-07-21 Thread Siegfried Heintze
The following code works with perl/MySQL. If I comment the second line, however, it does not work. No error messages and no results. If I use the MySQL Enterprise console and type in my first SELECT statement that includes the LIKE clause, it works. I'm stumped. There must be something strange

How to pass back information to shell

2005-07-15 Thread Siegfried Heintze
I'm using cygwin's bash on WinXP. I want to write a while loop in bash that will loop until my perl program returns 0. However, the following does not print 64 as expected. Why not? How can I keep calling my perl program until there is nothing left to do (as indicated by a zero)? Incidentally,

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
Can I assume that an auto-increment operation on an integer value is atomic (that is, cannot be interrupted by another thread)? This is a common assumption in C/C++. The perl debugger I use leads me to believe that perl stores all integers as strings however, in spite of my efforts to force them

RE: Microsoft Access storing images?

2005-07-02 Thread Siegfried Heintze
I've done this in C++ with Access and it is supported. I suspect it is quite possible with Perl. Since you cannot represent, for example, gif images as character string literal (not easily, anyway) you read your gif image from a file into a string and then bind it to a ? in your SQL statement.

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

2005-06-29 Thread Siegfried Heintze
I have the following line of code: my $id = async { PopulateIndustryCompanyJobs($sIndustryName, $nThread); $qCompleted-enqueue($sIndustryName); } It causes this error: Prototype mismatch: sub main::async (;@) vs () at c:/Perl/lib/Exporter.pm line 65. Here is the line of source code from my

RE: How to plug memory leak?

2005-06-20 Thread Siegfried Heintze
What about the memory used by threads? Do I have to join with a thread to recover its memory? I had trouble using the same four threads so I just create new ones when the old ones finish their assigned task. How do I delete the old threads that are idle? Thanks, Sieg -- To unsubscribe,

How to plug memory leak?

2005-06-19 Thread Siegfried Heintze
My multithreaded screen scraper runs for hours and gets slower, and slower and slower. I think I have a memory leak. I have a large set of nest hash tables. That is to say, I have hash tables inside of hash tables inside of hash tables etc... For example, I have

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

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]

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

2005-06-17 Thread Siegfried Heintze
Does MySQL/DBI really parse SQL statements in advance? I've been using mostly interpolated SQL statements in my screen scraping bot that is implemented with multiple threads and HTML::Parser. As you might now, HTML::Parser calls your code and you have to figure out how to save statement in between

How to write (and read) bit vector to (and from) MySQL?

2005-06-16 Thread Siegfried Heintze
I'm using the vec feature to create a bit vector and I want to write it to a mysql database. When this did not work using a string field, I tried tiny blob. It is writing some bits. When I get results back, they are not what I started with. Here is my code. Can someone tell me what I am doing

How to use qr to eliminate redundant code

2005-06-07 Thread Siegfried Heintze
This piece of code works, but it has a redundant pattern in it. Every time I try to create a variable my $pRole = qr/Assistant|Executive|Senior//; to replace the redundant patterns, it stops working. It has something to do with the gi qualifiers for the patterns. Can someone edit this code to use

RE: Argument passing between perl and a C function.

2005-06-07 Thread Siegfried Heintze
, 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 you said. Should I change

RE: Argument passing between perl and a C function.

2005-06-07 Thread Siegfried Heintze
: Siegfried Heintze [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 07, 2005 11:50 AM To: 'Japerlh' Cc: beginners@perl.org Subject: RE: Argument passing between perl and a C function. J, I assume you are (1) successful at calling this function calculate from C/C++ and (2) implementing this in a local DLL

RE: Argument passing between perl and a C function.

2005-06-06 Thread Siegfried Heintze
:[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: J, Is this a custom

HOw to pass patterns as function argments?

2005-06-05 Thread Siegfried Heintze
I have a fragment of code (consisting of a while loop) that removes all the keywords in string and puts them at the end. I would like to extract this while loop into it's own function and have patterns as function arguments. What should I pass to the function? Strings? Strategy A: sub abc { my

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]

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 Subject: Re: Search Pattern for Roman Numerals? On

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-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

Favorite packages for benchmarking?

2005-06-02 Thread Siegfried Heintze
There are lots of packages for date-time computations. What is the best one for timing computations for benchmarks? I'm thinking I want to fetch the time in 64 bit format instead of year, mo, day, hour, min, sec, nano seconds (which is what most of the date-time packages do). That should make

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

RE: Argument passing between perl and a C function.

2005-06-02 Thread Siegfried Heintze
. 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 Heintze Cc

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

2005-06-02 Thread Siegfried Heintze
, 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 Heintze said: How do I

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

When to print the cgi::header when using eval statement?

2005-06-01 Thread Siegfried Heintze
I was doing this: eval { push @results, h1 page content /h1; push @results, h2 more page content ...; $title = xyzz; if($Data-fetch()) { die Error, line .__LINE__; } # I never see this line number! } if($@){ print $q-header(), start_html(-title = Error $@); # This never worked

RE: A question about Win32:OLE

2005-06-01 Thread Siegfried Heintze
- From: J aperlh [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 31, 2005 6:48 PM To: Siegfried Heintze Cc: beginners@perl.org Subject: Re: A question about Win32:OLE Thanks for your help! I have a application installed on my system. I can start the application by using: my $app = Win32

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
Problem with Thread::Queue fixed. The sample program for Thread::Queue is incorrect (or maybe I just missed the :shared when declaring variable @Q). Well it is definitely incorrect in Larry's book: Programming Perl, 3rd Edition. Do they need a volunteer to update the documentation? This works

Perl syntax questions from source code in queue.pm

2005-05-18 Thread Siegfried Heintze
I'm looking at the source code for queue.pm and I'm quite surprised at how short it is. I have some questions about the syntax. (1) What does this colon (: shared) mean on line 69? I have not seen a colon used like this before. 67 sub new { 68 my $class = shift; 69 my

Questions on Perl Syntax from queue.pm

2005-05-18 Thread Siegfried Heintze
I apologize if this appears twice. I posted it once and did not see it appear (after waiting a few hours) in the list so I'm posting it again. I'm looking at the source code for queue.pm and I'm quite surprised at how short it is. I have some questions about the syntax: (1) What does

Thread queues don't seem to dequeue!

2005-05-17 Thread Siegfried Heintze
I'm trying to use the example on page 461 of Programming Perl. I've modified the code slightly and the problem is that the dequeue function seems to have no effect. I never see the print statement execute that indicates it has removed something from the queue. I do see the New Thread starting

Recommended approaches for exceptions, stacktraces, error messages

2005-05-16 Thread Siegfried Heintze
Is anybody (perhaps book authors) promoting a best practices for perl CGI programming? I've been doing the use warning; use strict; use CGI; # this is from memory, but you get the idea. my $q = CGI-new; my $html = ; eval { $html .= p $data /p; $html .= div more stuff $data2 /div;

Recomdations for Template Plugins for Windows/CGI/ApacheHTTP

2005-05-16 Thread Siegfried Heintze
Does anyone use Template::Plugin on windows/cgi/ApacheHTTP? Template::Plugin::GD::Text looks very intriguing and I'm wondering if I should go thru the trouble to try to install it on windows. I assume I need to understand Template::Plugin first. Are these plugins using the Template Toolkit

RE: How to use mime types for excel?

2005-05-14 Thread Siegfried Heintze
, 2005 2:17 PM To: beginners-cgi@perl.org Subject: Re: How to use mime types for excel? On Fri, May 13, 2005 at 02:06:42PM -0600, Siegfried Heintze wrote: I saw a very simple demonstration last night (at the Boulder Java users group) where Scott Davis showed a very simple java server pages program

RE: Advise me? Seeking GUI toolkit...

2005-05-14 Thread Siegfried Heintze
Have a look at Perl-Gtk2: http://gtk2-perl.sourceforge.net/ Assuming I'm not interested in the Cygwin X Server... I looked here and felt confused. Do I need to download the native GIMP first? I clicked on the PPM repository and saw a big list of files. Which one of these do I want to run GTK on

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

2005-05-14 Thread Siegfried Heintze
+? On Sun, 8 May 2005 23:53:14 -0600, [EMAIL PROTECTED] (Siegfried Heintze) wrote: I type $ perl -MCPAN -e 'install Gtk2' I get these errors (below). Can someone tell me what I am doing wrong? Here is a copy of a post on the gtk2-perl maillist. I havn't tried it myself

How to use mime types for excel?

2005-05-13 Thread Siegfried Heintze
I saw a very simple demonstration last night (at the Boulder Java users group) where Scott Davis showed a very simple java server pages program that transmitted HTML table data to a browser resident instance of Microsoft Excel. IE automatically looked at the mime types and invoked MS Excell to

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

2005-05-08 Thread Siegfried Heintze
I'm trying to install Java::Swing on ActiveState Perl 5.8+ on windows. Is this an appropriate forum for soliciting for help on this? After studying the source code for the failing test, I see the problem: In the test, we specify BEGIN { $ENV{CLASSPATH} .= 'java'; } This means we

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:/Perl/lib c:/Perl/si e/lib .)

RE: Favorite Packages for Platform Neutral GUI?

2005-05-05 Thread Siegfried Heintze
] Sent: Thursday, May 05, 2005 5:20 AMTo: Siegfried Heintze; 'Perl Beginners List'Subject: Re: Favorite Packages for Platform Neutral GUI? Siegfried Heintze wrote: I get the impression that there are several alternatives to use=ing Tk for writing OS neutral GUI programs in Perl. Can anyone point

Why don't I need a to call a function?

2005-05-05 Thread Siegfried Heintze
I've been studying this sample code that someone gave to me in response to one of my earlier queries. Why is it not necessary to put a in front of DBH in the statement DBH-prepare? Thanks, Siegfried use strict; use warnings; use DBI ; use Data::Dumper; our $dbh; sub DBH{ unless ( $dbh

Favorite Packages for Platform Neutral GUI?

2005-05-04 Thread Siegfried Heintze
I get the impression that there are several alternatives to use=ing Tk for writing OS neutral GUI programs in Perl. Can anyone point me to a discussion that might help me choose one? Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

GUI Packages for ActiveState Perl

2005-05-04 Thread Siegfried Heintze
Hmmm I guess I should have been more specific in my previous email. I'm using ActiveState on windows and I just checked out http://ppm.activestate.com/BuildStatus/5.8.html and learned that a lot of those interesting packages like java::swing and gtk don't check out on ActiveState. Too bad.

What does use vars '@ISA';@ISA = 'LWP::UserAgent';my $agent = __PACKAGE__-new;

2005-05-02 Thread Siegfried Heintze
Can someone help me understand Lincoln Stein's code I found in his book on network programming with perl? This is the beginning of a screen scraper. I thought ISA was an array of ancestors used exclusively for defining descendant classes. I guess I'm wrong. What the heck is going on here? I

How to call ancestor's constructor?

2005-04-30 Thread Siegfried Heintze
I'm trying to write a screen scraper and I need to use inheritance (according to a response to an earlier post). Here is the original piece of code: my $parser = HTML::Parser-new(api_version = 3); Now how do I change this so it is creating an instance of my custom class? Here is

Reading MSAccess Files under Linux?

2005-04-27 Thread Siegfried Heintze
I noticed the discussion about using perl to read MS Excel files. I assume this works under Linux. It got me thinking: Is there a way to read MSAccess files under Linux using perl? Sieg -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Starting Template for calling C from Perl

2005-04-22 Thread Siegfried Heintze
to it. If you described the problem you're having I can probably help. --t - Original Message - From: Siegfried Heintze [EMAIL PROTECTED] To: 'Perl Beginners List' beginners@perl.org Sent: Friday, April 22, 2005 9:37 AM Subject: Starting Template for calling C from Perl I was looking

Starting Template for calling C from Perl

2005-04-22 Thread Siegfried Heintze
I was looking at Programming Perl trying to understand how to write OS vendor neutral C functions to be called by perl and felt a little overwhelmed (as usual when reading that book). Can someone recommend a template that works with windows/MSVC/nmake or Cygwin/GCC/make (unix clone for windows

How to add my own start method to existing HTML::Parser class to Scrape Screens?

2005-04-22 Thread Siegfried Heintze
I'm trying to screen scape some information off the web. I anticipate that I'll want to have it multi-threaded. As per Lincoln Stein's book, I'm using HTML::Parser and passing a function pointer (you can tell I'm a C programmer) to $parser-handler(start= \start, 'self,tagname,

How to create arrays of arrays?

2005-04-19 Thread Siegfried Heintze
Hey Perlers! This code used to work and then I changed something and it no longer works! The problem is the output no longer includes string 2a and string 2b. What am I doing wrong? How do explicitly assign an array (not an array reference, but an array) to an array cell? Thanks, Sieg sub

RE: How to create arrays of arrays?

2005-04-19 Thread Siegfried Heintze
See comments in line: sub concat { # All arguments are assumed to be strings or nested arrays of strings. # Concatenate all elements of all arguments. return join , map ref eq ARRAY ? concat( @$_ ) : $_, @_ } my @sResult = (); push @sResult, string 1; push @sResult, string 2;

AutoIncrement Database Fields for MySQL and PostGreSQL

2005-04-11 Thread Siegfried Heintze
If I use the auto-increment feature for a couple of normalized relations, how do I insert into them? Specifically, when I insert into a relation with the autoincrement feature on the primary key, how do I get the value of the index on the newly created row so I can use that the value of a foreign

RE: AutoIncrement Database Fields for MySQL and PostGreSQL

2005-04-11 Thread Siegfried Heintze
Thanks. I see that works for mysql. my $lastid = $dbh-{mysql_insertid}; Is this a feature of MySQL or DBI? If it is not a feature of DBI, will it work for PostGreSQL? Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Simple MySQL Example?

2005-04-08 Thread Siegfried Heintze
I was looking at the example code in the mysql examples directory. They seem to have been created for testing things like very large records. Does anyone have a minimal example that executes a SQL SELECT command and displays the results? I need something really simple to get me started. It's

RE: Perl and quickbooks?

2005-03-15 Thread Siegfried Heintze
Chris, What are you trying to do? I would like to automate the creation of invoices with Quickbooks. Let me know how your project goes. Do you know how to apply QIF files? I know that Quick Books has an extensive COM interface which should be quite compatible with windows (ActiveState) perl. I

Favorite Perl CGI Framework for Web Site Development?

2005-02-11 Thread Siegfried Heintze
I notice there are a lot of frameworks out there for .NET (eg, .NETNUK), PHP, and Java (eg AppFuse) programmers. These are sets of files that form a typical starter site (or skeleton) that have the basic common features for a web site: (1) cookie/password authentication authorization, send email

How to use sub directories in IIS and Apache HTTPD

2005-02-05 Thread Siegfried Heintze
When I try to employ subdirectories my perl cgi programs stop working. This is because the use statements cannot find their files. I could convert the use evidence_db; statements to require '../evidence_db.pm'; and that works. But this is painful. Surely there is an easier way. I thought of

How to tell what account I'm running in on Win2K3?

2005-01-24 Thread Siegfried Heintze
I've been having a terrible time soliciting [EMAIL PROTECTED] for help. Apparently I'm on the mailing list because I see other folks' postings but I never see my own messages post. I'm trying to send automated email from my web page and Mail::SendMail is scrambling the URL in my anchor tag.

How to send mail using ActiveState and IIS

2005-01-07 Thread Siegfried Heintze
The perl script at the bottom was effective in sending email from a Perl CGI script on Win2K/IIS5. This script does not work anymore because CDONTS is not supported on our new server running Win2003 Server/IIS6. This VB/ASP script works on our new server, however: Set objCDOMail =

Warning: Use of hash a reference is deprecated

2005-01-07 Thread Siegfried Heintze
I'm getting a warning on line 10 or 11. The program works. I'd like to get rid of the warnings however. When I change %hash to $hash on lines 10-11 then the program does not work at all then. Thanks, Siegfried 1 package case; 2 our @EXPORT = qw( $crimhelp $evhelp $civhelp $rkhelp); 3

How do I distinguish between no value and false? (was RE: How does defined work?)

2005-01-05 Thread Siegfried Heintze
$juror_number = $nUserId; } else { die No valid ID for User; } ||-Original Message- ||From: Siegfried Heintze [mailto:[EMAIL PROTECTED] ||Sent: Monday, January 03, 2005 6:58 AM ||To: beginners@perl.org ||Subject: How does defined work? || ||I am posting

RE: $@ not working

2005-01-04 Thread Siegfried Heintze
Sorry -- I should have suspected the debugger. It runs correctly outside the debugger. -Original Message- From: Randy W. Sims [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 10:03 PM To: Siegfried Heintze Cc: beginners@perl.org Subject: Re: $@ not working Siegfried Heintze

RE: $@ not working

2005-01-03 Thread Siegfried Heintze
+, it prints No Exception. I'm expecting it to print Exception = throw. Is there a bug in my program, a bug in perl, or a bug in me? Thanks! Siegfried -Original Message- From: Randy W. Sims [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 1:03 AM To: Siegfried Heintze Cc: beginners

How does defined work?

2005-01-02 Thread Siegfried Heintze
I am posting this query in beginners instead of beginners-cgi because I believe this is a question about the defined statement and not the $q-param statement/function. I'm using this code: $q = new CGI; my $nUserId = $q-param(userId) ; I was hoping the defined keyword would tell

$@ not working

2005-01-02 Thread Siegfried Heintze
I have the following code (extracted from my cgi program) and I am expecting it to display an error message when it hits the if ($@){...} as a result of hitting the die statement. It does not (as indicated by single stepping with the windows perl debugger)! Instead it takes the else! Why? I'm

How to use join statement?

2005-01-02 Thread Siegfried Heintze
The following code does not work quite right because it has a trailing , . $sMainTable[2] .= $PCEs[$case_count]{$_}., foreach keys %{$PCEs[$case_count]}; How could I rewrite this, perhaps with a join statement/function, so there is no trailing ,? Thanks, Siegfried -- To unsubscribe,

RE: How to throw exceptions for perl cgi program?

2004-12-31 Thread Siegfried Heintze
@perl.org Subject: Re: How to throw exceptions for perl cgi program? In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Siegfried Heintze) writes: I'm buffering my html/javascript output in a large array of strings. This frees me to perform my computations independently of the order they appear

RE: Password Encryption

2004-12-29 Thread Siegfried Heintze
What a coincidence! I was wondering about thy same thing. Will this work on ActiveState Perl running WinXP2003 Server? I have Cygwin installed which should give me a glibc, but don't think ActiveState knows about it. How would I do this on my platform? Thanks, Siegfried -Original

  1   2   >