Re: Handling special characters in peoples names in XML

2013-07-02 Thread Jenda Krynicky
From: Gregory Machin g...@linuxpro.co.za Thanks Terry for responding. The files are very big and contain data I'd prefer not to be out in the wild. what parts of the file would be helpful , I can provide the lines with the text and say heard part of the xml ?? Thanks G Yep, that should

Re: Handling special characters in peoples names in XML

2013-06-20 Thread Jenda Krynicky
From: Gregory Machin g...@linuxpro.co.za I'm debugging an application written in Perl that converse data exported from the Nessus security scanner in xml format. I have narrowed down the bug to an issue with special characters in names that are in the file such as Fr~A©d~A©ric and Gr~A©goire

Re: Variables in $Excel-Workbooks-Open

2013-06-04 Thread Jenda Krynicky
Dear All, I am having an XLSX file in server and my OS in Win7. The first open statement is working fine in which we have give the actual file name. 2nd open function is not working where we have given the file name as variable. Please help in resolving this error. use Win32::OLE;

Re: Spreadsheet::WriteExcel - multi-coloured text in cells

2013-06-04 Thread Jenda Krynicky
From: Dr.Ruud rvtol+use...@isolution.nl On 15/05/2013 21:35, David Precious wrote: On Wed, 15 May 2013 10:34:02 +0100 Gary Stainburn gary.stainb...@ringways.co.uk wrote: Is it possible to write text cells where part of the string is highlighted in red? If so, how can I do it? I'm

Re: Any alternative for substr() function

2013-04-10 Thread Jenda Krynicky
From: timothy adigun 2teezp...@gmail.com On 10 Apr 2013 11:30, Chankey Pathak chankey...@gmail.com wrote: Hi Kavita, You may try unpack (http://perldoc.perl.org/functions/unpack.html) unpack would not work if the OP has varying length of lines. Nope. It would work just fine as long as

Re: Win32 - Killing Processes - update possible solution

2013-04-10 Thread Jenda Krynicky
From: Jonathan Harris jtnhar...@googlemail.com As it seems that Win32::Process::KillProcess is having difficulties killing a hanging process, I thought that it would probably make sense to ask the system to do it directly So, in the sub 'kill_it', I have replaced the line

Re: Problems in Mail::Sender on sending a large attachment file

2013-01-05 Thread Jenda Krynicky
I have used Mail::Sender for a number of years and I have had to move onto new VM for Processing. The Linux is Red Hat Enterprise Linux Server release 5.4 (Tikanga). Perl is v5.8.8 built for x86_64-linux-thread-multi Mail::Sender is 8.21 I am only sending

Re: Fast XML parser?

2012-10-31 Thread Jenda Krynicky
From: Octavian Rasnita orasn...@gmail.com I forgot to say that the script I previously sent to the list also crashed Perl and it popped an error window with: perl.exe - Application Error The instruction at 0x7c910f20 referenced memory at 0x0004. The memory could not be read. Click on

Re: Fast XML parser?

2012-10-30 Thread Jenda Krynicky
From: Octavian Rasnita orasn...@gmail.com To: beginners@perl.org Subject:Fast XML parser? Date sent: Thu, 25 Oct 2012 14:33:15 +0300 Hi, Can you recommend an XML parser which is faster than XML::Twig? I need to use an XML

Re: Perl Code

2012-09-09 Thread Jenda Krynicky
From: Chris Nehren c.nehren/beginn...@shadowcat.co.uk On Wed, Aug 29, 2012 at 09:59:22 -0700 , John SJ Anderson wrote: On Wednesday, August 29, 2012 at 9:46 AM, Ashwin Rao T wrote: 1)Check if IP address is in the range 172.125.1.0 and 172.125.25.0 using only return functions regular

Re: Mail::Sender with SSL

2012-08-16 Thread Jenda Krynicky
From: Chris Nehren c.nehren/beginn...@shadowcat.co.uk On Thu, Aug 16, 2012 at 00:05:56 +0200 , Jenda Krynicky wrote: From: Chris Nehren c.nehren/beginn...@shadowcat.co.uk On Tue, Aug 07, 2012 at 17:38:57 + , Thomas Dean wrote: Hi there, I have succeeded in sending mail to my

Re: Mail::Sender with SSL

2012-08-15 Thread Jenda Krynicky
From: Chris Nehren c.nehren/beginn...@shadowcat.co.uk On Tue, Aug 07, 2012 at 17:38:57 + , Thomas Dean wrote: Hi there, I have succeeded in sending mail to my SMTP server with Mail::Sender without SSL. But now I'm wondering how to do that with SSL, for example, GMail. After reading

Re: How to get the file handle of a scalar

2012-07-30 Thread Jenda Krynicky
From: Shlomi Fish shlo...@shlomifish.org Hi Thomas, On Mon, 30 Jul 2012 20:23:58 +0800 Thomas Dean tomdean...@gmail.com wrote: Hi there, I'm wondering how to get the file handle or a reference of a file object of a scalar in which stores a string. Starting from relatively

Re: Concatenation in Perl

2012-07-22 Thread Jenda Krynicky
From: Paul Johnson p...@pjcj.net You need a mixture of the two approaches: map to prepend not in: and join to join them. my $query = join and , map not in:$_, @folders; @folders = ('one', 'two'); my $query = not in: . join( and not in:, @folders); print $query; will be quicker. no need

Re: Very Sluggish Code

2012-07-11 Thread Jenda Krynicky
From: GlenM glenmill...@gmail.com # Read them into an array my @files_in_dir = grep { /xml/ } readdir(DIR); You want all files with lowercase xml anywhere the the name? Really? I think you want my @files_in_dir = grep { /\.xml$/i } readdir(DIR); instead. That is files with extension .xml.

Re: Book Recommendation - XPath, XML,SQL, XQuery

2012-04-24 Thread Jenda Krynicky
From: David Christensen dpchr...@holgerdanske.com On 04/17/2012 11:04 PM, flebber wrote: I also saw Perl XML - http://shop.oreilly.com/product/9780596002053.do These will probably both be good references I haven't read Perl and XML (nor XML and Perl). However, I am working on a

Re: Template::Toolkit question

2012-04-09 Thread Jenda Krynicky
To: beginners@perl.org From: Manfred Lotz manfred.l...@arcor.de Subject:Template::Toolkit question Date sent: Mon, 9 Apr 2012 20:28:14 +0200 Hi all, Let's say I use Template:Toolkit like this:

Re: Sending files efficiently with Net::SMTP

2012-04-02 Thread Jenda Krynicky
From: mailing lists listas.cor...@yahoo.es I have a perl (Ver. 5.10.0) program running over an old machine which send messages with this code:     my $smtp = Net::SMTP-new($dstMailServer, Timeout=10, Debug=0,);     unless(defined($smtp)){     syslog LOG_INFO, id:%s

Re: ASCII/binary endline character trouble

2012-03-27 Thread Jenda Krynicky
Date sent: Sun, 25 Mar 2012 15:45:11 -0700 (PDT) I write CGI scripts for my website in PERL.  When I used to upload them with my FTP program I made sure to do so in ASCII mode rather than binary.  My host made me switch to sFTP however.  I use FIlezilla, and can't for the life of me find

Re: Access class symtab by dereferencing an object

2012-03-14 Thread Jenda Krynicky
Date sent: Sat, 03 Mar 2012 14:42:35 -0500 From: Steve Bertrand steve.bertr...@gmail.com I've been writing a program that will perform extra work for diagnostics upon each method call. As of now, I need to write a call to an outside function manually into

Re: module for development

2011-12-15 Thread Jenda Krynicky
From: Brian Fraser frase...@gmail.com On Thu, Dec 15, 2011 at 10:09 AM, shawn wilson ag4ve...@gmail.com wrote: Strace stat(64) should do you. On Dec 15, 2011 8:03 AM, Ken Peng short...@gmail.com wrote: Hello, Which module could show the order of loading modules? For example,

Re: XML suggestions

2011-07-20 Thread Jenda Krynicky
From: Rob Coops rco...@gmail.com It really depends on what you are looking to do though, if you are aiming for just a simple thing with only a few messages then don't worry about XML::LibXML and go for XML::Simple which is more then enough in most simple cases ;-) Except that it's not so

Re: Nature of this list

2011-04-26 Thread Jenda Krynicky
From: Raymond Wan r@aist.go.jp 2011/4/25 Jenda Krynicky je...@krynicky.cz: From: Raymond Wan r@aist.go.jp After reading this, what came to mind is the problem of sexual and power harassment in the workplace, and maybe extending to other types of prejudices but maybe

Re: Nature of this list

2011-04-25 Thread Jenda Krynicky
From: Raymond Wan r@aist.go.jp Well, online bullying is a problem, but I don't think that saying Your Perl code sucks or Please don't post misleaing answers to people's Perl questions would qualify as online bullying. ... The point is this:  some crimes hinge upon what's going on

Re: Real Beginner

2011-04-21 Thread Jenda Krynicky
From: Tiago Hori tiago.h...@gmail.com Hey Guys, I am a real beginner so at the risk of being slammed by some, I wanted to get some input. Don't worry, there are people here that will protect you and shout you were slammed even if you do not feel hurt at all. 5. [10] Modify the previous

Re: devices without division

2011-04-20 Thread Jenda Krynicky
How to write a device funciton without using a '/' operator sub device_now($a, $b){ my ($a, $b)=@; don't use $result=$a/$b; return $result; } device_now(6,3); That's divide, not device. Not sure it's the solution that the professor had in mind, but you can use

Re: sample distribution

2011-04-20 Thread Jenda Krynicky
From: Peter Scott pe...@psdt.com On Tue, 19 Apr 2011 16:29:16 -0700, ai nguyen wrote: A population of 20 cows, each one has age and weight (known). Device this population into 2 group, each group has 10 cows. Questions: How to pick a cow on each group so that a distribution of AGE

Re: Changing XML Tag Value in Perl

2011-04-19 Thread Jenda Krynicky
From: Rajpreet rajpreetsi...@gmail.com Thanks for your replies. But the above message is jst a sample and the exact message we get is pretty huge(its a trading sysem message)... I do have XML Parser installed.. I was trying to format a sample message using start and a default

Re: Dynamic replacement of the variable

2011-04-19 Thread Jenda Krynicky
From: Shlomi Fish shlo...@iglu.org.il On Monday 18 Apr 2011 08:50:43 Uri Guttman wrote: SF == Shlomi Fish shlo...@iglu.org.il writes: SF Hi Uri, SF thanks for all your input on this list. See below for my response. SF On Monday 18 Apr 2011 07:56:16 Uri Guttman wrote: mr ==

Re: Dynamic replacement of the variable

2011-04-19 Thread Jenda Krynicky
From: Rob Dixon rob.di...@gmx.com On 19/04/2011 12:56, Jenda Krynicky wrote: SF Well, you are right naturally, but there is no need to be so SF rude. Start your email with a greeting, continue with a SF compliment, use soft words, etc. Otherwise, you may be scaring SF

Re: transposing %d values to %x output

2011-03-30 Thread Jenda Krynicky
From: Jim Gibson jimsgib...@gmail.com At 9:18 PM -0400 3/29/11, Chas. Owens wrote: It is important to note that \d doesn't match what you think it does. Starting with Perl 5.8, \d matches and digit character. This includes characters such as \x{1815} (Mongolian digit five). To match the

Re: Garbled lines

2011-03-28 Thread Jenda Krynicky
From: HACKER Nora nora.hac...@stgkk.at I am not sure whether this is really a Perl problem but maybe anybody can point me into the right direction: I am generating insert statements and writing them into a file for later execution. Most of the lines are written correctly: snipped

Re: How to avoid Out of Memory Errors when dealing with a large XML file?

2011-01-14 Thread Jenda Krynicky
From: Saqib Ali saqib.ali...@gmail.com I'm reading a large (57 MB) XML file Using XML::XPath::XMLParser() I keep getting this error: Callback called exit at XML/XPath/Node/Element.pm at line 144 during global destruction. I'm using Windows XP. So I watched the task-management memory

Re: [OT] The Happy, Happy, Feel Good Thread (WAS: New Document: How to Start Contributing to or Using Open Source Software)

2011-01-01 Thread Jenda Krynicky
From: Octavian Rasnita orasn...@gmail.com This answer is very good for Top posts don't bother me as much as those who don't trim the quotes. also. :-) When top-posting, the advantage is that it is not important how many messages remain at the bottom, exactly because nobody

Re: [OT] The Happy, Happy, Feel Good Thread (WAS: New Document: How to Start Contributing to or Using Open Source Software)

2011-01-01 Thread Jenda Krynicky
From: Octavian Rasnita orasn...@gmail.com From: Jenda Krynicky je...@krynicky.cz There was a period when it was OK to follow that old netiquette that said that bottom-posting is the good way, but now it isn't. Because you said so? Yes. Me and many others. I bottom post (on Perl

Re: XML Challenge Cannot

2010-12-18 Thread Jenda Krynicky
From: Chaitanya Yanamadala dr.virus.in...@gmail.com Hai Liam Thank you for the reply. Thank u for letting me know an alternative for this. But there is a problem with what you have sent. It is not just removing of the bottom group tag that is required. If you check the input then u can

Re: Strategy for diagnosing context-sensitive bug

2010-12-13 Thread Jenda Krynicky
From: Rob Dixon rob.di...@gmx.com On 07/12/2010 09:24, Jonathan Pool wrote: The current script where the error occurs is at http://panlex.svn.sourceforge.net/viewvc/panlex/perl/plxu.cgi?revision=27view=markup The error occurs at line 1297. So the line in question is @res =

Re: Object introspection + adding method

2010-10-24 Thread Jenda Krynicky
From: Jeff Peng pen...@nsbeta.info On Sat, Oct 23, 2010 at 07:52:50PM +0200, Shlomi Fish wrote: Just be sure you know what you are doing. Adding a method to somone else's class can be considered rude. See the NOTE in perldoc perlmodlib. He/she is maybe coming from other language

Re: Perl obfuscator

2010-08-22 Thread Jenda Krynicky
From: Shawn H Corey shawnhco...@gmail.com On 10-08-20 03:46 PM, Tobias Eichner wrote: Why do you need any obfuscator? If you want to protect your code from web access, put it in a module in a directory that cannot be access from the web and put a stub that calls the module at the site.

Re: A problem while using XML::Parser::PerlSAX

2010-07-01 Thread Jenda Krynicky
From: Jason Feng q15...@hotmail.com I am using XML::Parser::PerlSAX to parse a 300M XML file. I meet a strange issue with handler characters. This handler is supposed to return all the contents between start markup and end markup. But sometimes it just returns one part of the whole contents.

Re: How to allocation a desired size (e.g. 64KB) of contigugous memory block in perl?

2010-06-30 Thread Jenda Krynicky
From: Shlomi Fish shlo...@iglu.org.il On Wednesday 30 Jun 2010 10:01:45 Yang Zhou wrote: Hi Shlomi, Thanks for your help. I tried the my $buffer = \0 x 65536; method, but segmentation fault in the C function remains. I know little about XS, it seems a declaration of the interface

Re: Simple, synchronous interaction with a local server process

2010-06-27 Thread Jenda Krynicky
From: Chap Harrison c...@pobox.com On Jun 26, 2010, at 7:34 AM, Jenda Krynicky wrote: Did you try DBD::ODBC? I do believe there are still ODBC drivers for dBaseIV installed on your computer so this should work. What problems did not you have? I *think* the problem is that dBaseIV

Re: XML output processing question

2010-06-26 Thread Jenda Krynicky
From: saw saweinfi...@gmail.com Given one large XML file such as: A B CDE E=Eattr/F F=Fattr/G//D/C CDE E=Eattr/F F=Fattr/G//D/C !-- many more C sub-trees -- /B /A I want to create many small XML files consisting of a Root element and the C sub-tree. I would like to

Re: Edit large data file

2010-06-26 Thread Jenda Krynicky
From: mrwawa wade.w...@gmail.com On Jun 16, 7:14 am, rwci...@alum.calberkeley.org (Robert Citek) wrote: On Tue, Jun 15, 2010 at 1:50 PM, mrwawa wade.w...@gmail.com wrote: Is this possible, and if so how can I do it? Can you give an example? For example, using colons instead of tabs,

Re: What is the best way to parse a GPX (XML) file

2010-06-26 Thread Jenda Krynicky
Date sent: Wed, 16 Jun 2010 20:26:53 +0800 Subject:Re: What is the best way to parse a GPX (XML) file From: Jeff Pang jeffp...@aol.com To: robert Key robert...@telkomsa.net Copies to: beginners@perl.org 2010/6/16

Re: Simple, synchronous interaction with a local server process

2010-06-26 Thread Jenda Krynicky
From: Chap Harrison c...@pobox.com I have a Perl app that makes SQL queries to DBF (DBase IV) databases. I haven't found a reliable DBI::DBD module for accessing DBase IV, but I do have a copy of the JDBC library, so I wrote a simple Java command-line program that accepts a database path and

Re: Here Docs

2010-06-02 Thread Jenda Krynicky
From: Uri Guttman u...@stemsystems.com JK == Jenda Krynicky je...@krynicky.cz writes: JK From: Joseph L. Casale jcas...@activenetwerx.com Inside a here doc, how can I force an expression to be evaluated such as localtime: here docs are just a different form of string so any

Re: Here Docs

2010-06-01 Thread Jenda Krynicky
From: Joseph L. Casale jcas...@activenetwerx.com Inside a here doc, how can I force an expression to be evaluated such as localtime: print END; `localtime time` Foo Bar END use Interpolation eval = 'eval'; print END; $eval{localtime time} Foo Bar END CPAN -

Re: get acl's of directory

2010-06-01 Thread Jenda Krynicky
From: Andreas Moroder andreas.moro...@sb-brixen.it Hello, is it possible to get the acl entrie of a directory on linux with perl ? Thanks Andreas What do you mean by acl? Access Control List? There is no such thing under Linux, the permissions system works differently

Re: How to create DSN on Solaris for Win32::ODBC

2010-04-17 Thread Jenda Krynicky
From: Parag Kalra paragka...@gmail.com Date sent: Thu, 8 Apr 2010 22:34:21 -0700 Subject:How to create DSN on Solaris for Win32::ODBC To: Perl Beginners beginners@perl.org Hi All, I am planing to use Win32::ODBC to connect to SQL Server from Solaris through Perl. You

Re: [Was XS linker]

2010-04-12 Thread Jenda Krynicky
From: Rene Schickbauer rene.schickba...@gmail.com Some of the rules doesn't even make sense anymore, like the four-line-signature: Most people - when using their company mail account - are forced by local law to include a number of information (address, telephone number, company chairman,

Re: how do I replace all the spaces in a string with +

2010-02-25 Thread Jenda Krynicky
From: Erik Lewis ele...@ngrl.org snipped print Enter your address\n; chomp (my $rawaddress = ); my $geoaddress = $rawaddress =~ s/ /\+/; #strip the spaces from the address my $googlekey = ABQIJKeZa28YtErALcrbEC0UlBREf5oWR6F07BQvSEe3pww8R4s0VhTfTt-19vTI9qA-_V1pUf4-_TcfpQ; #get

Re: how do I replace all the spaces in a string with +

2010-02-25 Thread Jenda Krynicky
From: Erik Lewis ele...@ngrl.org Thanks that probably explains my higher than expected ungeocoded rate. Two weeks of playing with perl and I feel like I know less than when I started. The more you learn the more you find out you know nothing ;-) This feeling is to be expected. Don't let

Re: XML::Simple parsing with attributes

2010-01-22 Thread Jenda Krynicky
From: Shlomi Fish shlo...@iglu.org.il On Friday 22 Jan 2010 00:44:39 Jenda Krynicky wrote: From: Shlomi Fish shlo...@iglu.org.il This because you can very well represent XML in Perl data structures without any loss of complexity. See for example XML::Compile. Wrong

Re: XML::Simple parsing with attributes

2010-01-21 Thread Jenda Krynicky
Date sent: Fri, 15 Jan 2010 11:11:55 -0800 Subject:XML::Simple parsing with attributes From: Grant emailgr...@gmail.com To: Perl Beginners List beginners@perl.org Anybody here familiar with XML::Simple? I need to parse some XML

Re: XML::Simple parsing with attributes

2010-01-21 Thread Jenda Krynicky
From: Shlomi Fish shlo...@iglu.org.il This because you can very well represent XML in Perl data structures without any loss of complexity. See for example XML::Compile. Wrong! If for example you have something like {{{ pHello this is a a href=http://www.example.tld/;link for something/a/p

Re: What interative perl shell I should use to debug the perl code?

2010-01-04 Thread Jenda Krynicky
From: Peng Yu pengyu...@gmail.com It seems that there are more than one choices of perl interactive shells. I'm wondering which one is best or most popular. For example, I have a perl file that first load a huge data file then do some processing on the data file. The loading time is much

Re: Clone an object

2009-12-31 Thread Jenda Krynicky
- You might, but what about others? You do want others to read your messages and help you with your questions, don't you? - But I remember what I wrote last time so I don't have to read it. - 'cause it's all backwards! - Why is that? - Because it's hard to read. - Why? - Please do not top post.

Re: Clone an object

2009-12-31 Thread Jenda Krynicky
From: Erez Schatz moonb...@gmail.com Shlomi, please stop correcting the English of those who post here. It's rude, nope off-topic, maybe and unimportant. Not at all. Being able to express your needs/questions clearly is quite important. Jenda = je...@krynicky.cz ===

Re: Comparison of the comma versus the period in print statements

2009-12-22 Thread Jenda Krynicky
From: Marc Perry marcperrys...@gmail.com I noticed that most beginner texts will introduce and use print like this: print $moose, $squirrel, $boris, \n; However, when I review code from CPAN, I often (typically) see: print $bullwinkle . $rocky . $natasha . \n; As I recall, print is a

Re: XML::Simple question

2009-12-22 Thread Jenda Krynicky
From: Mike Blezien mick...@frontiernet.net Hello, were using the XML/Simple module to process a XML response using the code below. But for some reason the module can't read the $xmlresponse data unless we create a temp file first to store the data then pass that to

Re: what's a database handler

2009-12-21 Thread Jenda Krynicky
From: Xiao Lan (a°a...°) practicalp...@gmail.com Hi, When I get a database handler with DBI, my $dbh = DBI-connect(...); That's a handle not a handler. A very different thing. Jenda = je...@krynicky.cz === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards

Re: capture error - the better way?

2009-12-16 Thread Jenda Krynicky
From: Philip Potter philip.g.pot...@gmail.com 2009/12/16 Shlomi Fish shlo...@iglu.org.il: On Tuesday 15 Dec 2009 17:14:25 Philip Potter wrote: If evaluating a constant expression results in a runtime exception, that runtime exception must happen at runtime, and not at compile time. In

Re: Help me understand

2009-12-05 Thread Jenda Krynicky
From: 120 zen158...@zen.co.uk I've looked at this: sub encrypt { my $self = shift; my $xx = $$self; #.. cut stuff I do understand return $self-SUPER::encrypt(); } Could someone help me with the Perl to English here? I get that $self is shifting the arguement.

Re: speed test

2009-12-04 Thread Jenda Krynicky
From: Rob Coops rco...@gmail.com A daily job that by the sound of it will not be changing a whole lot, jut get executed pretty much till the end of times... C is your friend. Perl would certainly get the job done and on time without to much problems, but if you are worried there isn't much

Re: Assignment Operator

2009-11-28 Thread Jenda Krynicky
From: Marco Pacini i...@marcopacini.org Subject:Assignment Operator Date sent: Thu, 26 Nov 2009 12:31:54 +0100 To: beginners@perl.org Hi All, I'm studying Perl since one week on Learning Perl written by L. Wall and in the

Re: 答复: the question of one program

2009-11-23 Thread Jenda Krynicky
From: Philip Potter philip.g.pot...@gmail.com 2009/11/20 gaochong zjgaoch...@gmail.com: Thanks . But the code is from cpan.org ,and is crappy ,where I will go ? CPAN has no quality control. There is no guarantee that anything you get from CPAN will not be, as you say, crappy. As a

Re: Trace used functions within an app

2009-11-07 Thread Jenda Krynicky
From: Dermot paik...@googlemail.com I have been asked to look at/add features to an existing ModPerl app that has thousands of lines of code spread over tens of modules. Some are OO, some are function-oriented. There looks like there's lots of debris and unused functions. For

Re: Sorting mixed alphanumerics

2009-10-14 Thread Jenda Krynicky
Date sent: Wed, 14 Oct 2009 11:03:13 -0400 From: Shawn H Corey shawnhco...@gmail.com To: Rick Triplett r...@reason.net Copies to: Perl Beginners beginners@perl.org Subject:Re: Sorting mixed alphanumerics Rick

Re: Sorting mixed alphanumerics

2009-10-14 Thread Jenda Krynicky
From: Shawn H Corey shawnhco...@gmail.com Jenda Krynicky wrote: ST is an overkill if the extraction is simple. Especially if the number of items is fairly small. Actually if the extraction is really simple and the extracted key is not so small, than ST may perform worse than

Re: DBI driving me nuts ... !

2009-10-07 Thread Jenda Krynicky
Please can you advise ? #!/usr/bin/perl use Mysql; $dbh = Mysql-connect(localhost,mailscanner,root,c0nc3pt) or die (Error . Mysql-errno . - . Mysql-errstr); ... I do not see any DBI in here. Though ... http://search.cpan.org/~capttofu/DBD-mysql- 3.0008/lib/Mysql.pm says

Re: Arrays, Dates, Indexing and Initialisation

2009-09-28 Thread Jenda Krynicky
Date sent: Mon, 28 Sep 2009 09:11:02 -0700 Subject:Re: Arrays, Dates, Indexing and Initialisation From: r...@i.frys.com To: Soham Das soham...@yahoo.co.in Copies to: beginners@perl.org Soham Das wrote: Hello All,

Re: typical errors beginners make

2009-09-19 Thread Jenda Krynicky
From: Gabor Szabo szab...@gmail.com For some reason - maybe because my students are not English speakers - many of them type use warning; Which gives them the following error: Can't locate warning.pm in @INC (@INC contains:

Re: text html from file to a scalar and mail

2009-09-12 Thread Jenda Krynicky
From: Shlomi Fish shlo...@iglu.org.il use FileHandle; my $signature = new FileHandle; $signature-open($signature_file)or die Could not open file\n; You should use IO::Handle instead of File::Handle (or IO::File in your case), and use the three args open. It's nice you've used

Re: watch folder concept in Perl

2009-09-07 Thread Jenda Krynicky
Date sent: Mon, 7 Sep 2009 17:58:35 +0530 Subject:watch folder concept in Perl From: Ganesh Babu N nbabugan...@gmail.com To: Perl beginners@perl.org Dear All, Can we develop application which will watch a specific folder and

Re: search replace saved to a variable

2009-09-03 Thread Jenda Krynicky
From: Noah Garrett Wallach noah-l...@enabled.com okay a step further - is there a way to make the following a one liner? (my $filename_cmd = $cmd[-1]) =~ s/\|//g; $filename_cmd =~ s/\s+/\./g; $filename_cmd =~ s/save.*//g; There's no point in making it a one liner. Plus

Re: Perl's superior text parsing power

2009-09-03 Thread Jenda Krynicky
From: Shawn H. Corey shawnhco...@gmail.com Dave Tang wrote: I wanted to ask why is Perl, in comparison to other programming languages, so powerful in text processing? Undoubtedly, when it was written, Perl was the most powerful text processing language available. This is no longer the

Re: Creating array variable names on the fly

2009-08-28 Thread Jenda Krynicky
From: ANJAN PURKAYASTHA anjan.purkayas...@gmail.com Hi, I have a question on creating array variables. I have a driver script that takes as input the number of files to be processed (say 7). One of the children scripts needs to create array variables based on how many files are being

Re: removing a 'tee'd file handles going forward

2009-08-26 Thread Jenda Krynicky
Date sent: Wed, 26 Aug 2009 15:36:26 + (GMT) From: Tony Esposito tony1234567...@yahoo.co.uk Subject:removing a 'tee'd file handles going forward To: Beginners Perl beginners@perl.org I want to output to both STDOUT and STDERR at one point in my program, then want to

Re: removing a 'tee'd file handles going forward

2009-08-26 Thread Jenda Krynicky
From: Tony Esposito tony1234567...@yahoo.co.uk Agreed.  But the program flow would be such (pseudo-code): (1) print STDOUT     print STDERR (2) now print to both in one print statement (3) now go back to     print STDOUT     print STDERR I want to switch back-and-forth between being

Re: Procedural modules in an object-oriented project

2009-08-18 Thread Jenda Krynicky
From: Steve Bertrand st...@ibctech.ca My ISP management project which started out as a learning experience has grown into a system that currently contains 10 modules. The entire system is object-oriented. While reviewing my POD to ensure that I've been keeping it up-to-date properly, and so

Re: Attentipn Please!! Need A Perl script to read the UIDs from two text files having the details in the format as given in th

2009-08-17 Thread Jenda Krynicky
From: Ian pcs...@gmail.com This is how I would do it. To every one else, please feel free to critique my perl programming skills. I'm a Mainframe Assembler programmer and still learning perl. Any critique will just help to improve my skills. The script is fine, the fact that you wrote it

Re: Coding best practices

2009-08-14 Thread Jenda Krynicky
From: Shawn H. Corey shawnhco...@gmail.com I use Data::Dumper a lot, so most of my debugging statements have Dumper in them, making them easy to find. For those that don't, I add # TEMPORARY at the end. And I leave them behind; I just put a # in front of them. :) I tend to not indent

Re: IO::File close on undef behaviour?

2009-08-12 Thread Jenda Krynicky
From: Philip Potter philip.g.pot...@gmail.com Dear all, I'm trying to learn to use the IO::File object as a means of passing a filehandle from one function to another. In the perldoc documentation for IO::File, it gives the example: undef $fh; # automatically closes the file but

Re: Inverting a hash safely

2009-08-03 Thread Jenda Krynicky
From: Ed Avis e...@waniasset.com My question is, does there exist a 'safe hash invert' function in some CPAN module? I was imagining something like my %hash = (a = 1, b = 2); my %reverse = safe_hash_invert %hash; # works fine $hash{c} = 1; %reverse = safe_hash_invert

Re: while () and wildcards on DOS/Windows

2009-08-03 Thread Jenda Krynicky
From: Peter Daum gator...@yahoo.de I occasionally have to write Perl scripts that should behave the same on Unix- and DOS-like Systems. One little problem I encounter there is: For quick hacks, the while() mechanism is very handy, because it saves a lot of typing. On Unix, I can call a

Re: Inverting a hash safely

2009-08-03 Thread Jenda Krynicky
From: Ed Avis e...@waniasset.com Jenda Krynicky Jenda at Krynicky.cz writes: my %hash = (a = 1, b = 2); my %reverse = safe_hash_invert %hash; # works fine $hash{c} = 1; %reverse = safe_hash_invert %hash; # throws an error I don't think there is and I don't think

Re: Inverting a hash safely

2009-08-03 Thread Jenda Krynicky
From: Shawn H. Corey shawnhco...@gmail.com Jenda Krynicky wrote: And if you feel like it, create a function that reverses (a = 1, b = 3, c = 1) = (1 = ['a','c'], 2 = ['b']) That's something that's not a SIMPLE oneliner. Even though of course it's not too complex either. I think

Re: Need help with Mail::Sender

2009-06-26 Thread Jenda Krynicky
Date sent: Thu, 25 Jun 2009 23:27:24 -0500 From: Dennis Wicks dgwi...@gmail.com To: Perl Beginners beginners@perl.org Subject:Need help with Mail::Sender Greetings; Following the docs I have it working, somewhat, but it is

Re: redirecting STDERR with IO::Tee

2009-06-25 Thread Jenda Krynicky
Date sent: Mon, 22 Jun 2009 10:53:06 -0700 From: pa...@compugenic.com To: beginners@perl.org Subject:redirecting STDERR with IO::Tee I have a script which runs mostly via a cron job and sometimes interactively. I would like

Re: question about constants

2009-06-24 Thread Jenda Krynicky
From: Roman Makurin dro...@gmail.com here is complite perl script which produces such results without any warning: #!/usr/bin/perl use strict; use warnings; use constant { A = 0, B = 1, C = 2 }; my @a = (A, B, C); my @b = (1, 2, 3); while(my $i = shift @a) {

Re: question about constants

2009-06-24 Thread Jenda Krynicky
Steve Bertrand st...@ibctech.ca wrote: Roman Makurin wrote: On Wed, Jun 24, 2009 at 03:25:57PM +0200, Jenda Krynicky wrote: From: Roman Makurin dro...@gmail.com here is complite perl script which produces such results without any warning: #!/usr/bin/perl use strict; use warnings

Re: question about eval usage

2009-06-23 Thread Jenda Krynicky
From: Roman Makurin dro...@gmail.com Just looked throught some standart perl modules and found something cryptic to myself: package Module; $Module::VERSION = '1.0'; $Module::VERSION = eval $Module::VERSION; Why eval part is needed here ? It's not. What module was that? Maybe you

Re: question about eval usage

2009-06-23 Thread Jenda Krynicky
From: Roman Makurin dro...@gmail.com On Tue, Jun 23, 2009 at 12:46:33PM +0200, Jenda Krynicky wrote: From: Roman Makurin dro...@gmail.com Just looked throught some standart perl modules and found something cryptic to myself: package Module; $Module::VERSION = '1.0

Re: question about eval usage

2009-06-23 Thread Jenda Krynicky
From: Paul Johnson p...@pjcj.net On Tue, Jun 23, 2009 at 06:35:26PM +0200, Jenda Krynicky wrote: From: Roman Makurin dro...@gmail.com On Tue, Jun 23, 2009 at 12:46:33PM +0200, Jenda Krynicky wrote: From: Roman Makurin dro...@gmail.com Just looked throught some standart perl modules

Re: Need help with Email::Send

2009-06-22 Thread Jenda Krynicky
From: Dennis G. Wicks dgwi...@gmail.com Jeff Pang wrote the following on 06/21/2009 09:51 PM: 2009/6/22 Dennis G. Wicks dgwi...@gmail.com: Greetings; I can't seem to find the problem with the Email::Send portion of this program. It may be that I am getting an error from the smtp server

Re: Please, I need help!!!

2009-06-12 Thread Jenda Krynicky
From: Jim Gibson jimsgib...@gmail.com On 6/11/09 Thu Jun 11, 2009 11:00 AM, Phillip fibbe...@gmx.net scribbled: Hallo @ all, i am new in this domain(perlscript) and i have a question.i have a array,i sort it,i get the last element of the array but i want to get the next element

Re: better way to write this

2009-06-11 Thread Jenda Krynicky
From: raphael() raphael.j...@gmail.com It is actually very enlightening to read all the post on this list. Most of the stuff actually goes over my head as I have no need/knowledge of CGI or dbase. Just some text processing. I am new to Programming/Perl (chapter 5 Learning Perl). I also

Re: better way to write this

2009-06-11 Thread Jenda Krynicky
From: John W. Krahn jwkr...@shaw.ca Jenda Krynicky wrote: From: raphael() raphael.j...@gmail.com It is actually very enlightening to read all the post on this list. Most of the stuff actually goes over my head as I have no need/knowledge of CGI or dbase. Just some text processing

Re: Working with a hash within an object

2009-06-10 Thread Jenda Krynicky
From: Steve Bertrand st...@ibctech.ca Hi all, I know this is a no-brainer, but I'm drawing a blank after coding all day (I'm not a coder by trade). I'm trying to write a test program for a function I'm accessing from a module I wrote years ago, and because I'm over-tired, I can't remember

  1   2   3   4   5   6   7   8   9   10   >