Re: Big unicode problem with Perl 5.8.8 with MySQL 5.0 (i.e. Debian 4.0)

2007-08-31 Thread Karjala
Thanks, I solved the problem by following the advice on the second comment on this page: http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html Chas Owens wrote: On 8/29/07, Karjala [EMAIL PROTECTED] wrote: snip I'm desperate for a solution, a hint, or if you run Debian to please

Big unicode problem with Perl 5.8.8 with MySQL 5.0 (i.e. Debian 4.0)

2007-08-29 Thread Karjala
I just upgraded from Debian 3 (Perl 5.8.4 and MySQL 4.1) to Debian 4 (Perl 5.8.8 and MySQL 5.0 and DBD::mysql 3.0008) and have the following problem: In the following lines I create a table with a char field of length 4 and then try, using a perl script, to populate it with a string of 4

Re: XML Parsing

2007-06-26 Thread Karjala
You could use XML::MyXML for this job (works well), if you know the exact position in the XML tree where message is located. Say $xml holds your XML. Then: use XML::MyXML qw(:all); $obj = xml_to_object($xml) $msg_obj =

Re: XML Parsing

2007-06-26 Thread Karjala
Mike Blezien wrote: can this handle multiple elements with the same name? IE. the path used above may have more then one message/message element within the raiserisklevelmessage ... /messagemessage ... /message /raiserisklevel Mike It can, as follows: my @message_objects =

Creating RSS feeds with Perl?

2006-10-11 Thread Karjala
How do you create your websites' RSS feeds? I run a script called createrss.pl as a cron job every hour which checks if there are any new stories and if so creates a new feed.rss file I think this method takes up a lot of RAM and CPU power since it launches Perl every hour, but I can't think

MySQL question

2006-07-21 Thread Karjala
Maybe I should ask this question on a database list, but it's related to DBI, so I'm asking here also: I have a field in a record in the MySQL database that contains a number. I increase it by one with $dbh-do(update table set myfield = myfield + 1 where mykey = 10); I was wondering whether

Re: hashref ref ref slice

2006-05-03 Thread Karjala
Try this: map {$_-{text}} @[EMAIL PROTECTED] Ryan Perry wrote: @[EMAIL PROTECTED]{text} I want to get all the text values for a set of keys in a hashref, but the above code always gives me only the first in @sortedkeys. Thanks for any assistance! Ryan --To unsubscribe, e-mail: [EMAIL

Re: hashref ref ref slice

2006-05-03 Thread Karjala
And this will work also: map {$tmp-{$_}-{text}} @sortedkeys Karjala wrote: Try this: map {$_-{text}} @[EMAIL PROTECTED] Ryan Perry wrote: @[EMAIL PROTECTED]{text} I want to get all the text values for a set of keys in a hashref, but the above code always gives me only the first

Java/Perl

2006-04-30 Thread Karjala
Has anyone used the Java module successfully in Perl? If yes, I will post my very basic question. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

Re: Interprocess communications for Windows Perl

2006-04-19 Thread Karjala
I guess then sockets is the right way for my case. Thanks. zentara wrote: Personally, I would stick with sockets, since it is more foolproof and well tested. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Interprocess communications for Windows Perl

2006-04-18 Thread Karjala
for IPC (Interprocess communication) because they were easy to use and made the Perl programs much shorter than with TCP/IP sockets. Does MS-Windows support named pipes in a similar way to Linux? Are there any modules that you would recommend for Windows IPC? Thanks, - Karjala

Create ODBC driver?

2006-04-14 Thread Karjala
. It would be nice if I could create such an ODBC driver with Perl. - Karjala -- 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 detect if the other end of the TCP connection has gone offline

2005-10-31 Thread Karjala
I'm writing a simple client-server application, and I'm trying to find a way to tell if the other end of an open TCP connection has gone offline. I heard that with C you can send a packet of data and check if an ACK packet comes back. If it doesn't then the connection is closed. But how can