Re: Handling special characters in peoples names in XML

2013-07-02 Thread Jenda Krynicky
From: Gregory Machin > 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 be enough.

Re: Handling special characters in peoples names in XML

2013-06-20 Thread Jenda Krynicky
From: Gregory Machin > 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 , thus ~A© are

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

2013-06-04 Thread Jenda Krynicky
From: "Dr.Ruud" > On 15/05/2013 21:35, David Precious wrote: > > On Wed, 15 May 2013 10:34:02 +0100 > > Gary Stainburn 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 fairly sure the format of a cell applie

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

Re: Win32 - Killing Processes - update possible solution

2013-04-10 Thread Jenda Krynicky
From: Jonathan Harris > 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 > > Win32::Process::KillProcess ($new_

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

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

Re: Fast XML parser?

2012-10-31 Thread Jenda Krynicky
From: "Octavian Rasnita" > 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 OK t

Re: Fast XML parser?

2012-10-30 Thread Jenda Krynicky
From: "Octavian Rasnita" To: 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 parser that can parse the XML f

Re: Perl Code

2012-09-09 Thread Jenda Krynicky
From: Chris Nehren > 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 expressions in Perl. >

Re: Mail::Sender with SSL

2012-08-16 Thread Jenda Krynicky
From: Chris Nehren > On Thu, Aug 16, 2012 at 00:05:56 +0200 , Jenda Krynicky wrote: > > From: Chris Nehren > > > On Tue, Aug 07, 2012 at 17:38:57 + , Thomas Dean wrote: > > > > Hi there, > > > > > > > > I have succeeded in sending mail t

Re: Mail::Sender with SSL

2012-08-15 Thread Jenda Krynicky
From: Chris Nehren > 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 the doc, I set TLS_requ

Re: How to get the file handle of a scalar

2012-07-30 Thread Jenda Krynicky
From: Shlomi Fish > Hi Thomas, > > On Mon, 30 Jul 2012 20:23:58 +0800 > Thomas Dean 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 recent versions of Perl, you

Re: Concatenation in Perl

2012-07-22 Thread Jenda Krynicky
From: Paul Johnson > 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 > # 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. > closedir DIR; >

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

2012-04-24 Thread Jenda Krynicky
From: David Christensen > 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 project that could b

Re: Template::Toolkit question

2012-04-09 Thread Jenda Krynicky
To: beginners@perl.org From: Manfred Lotz 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: > > <-snip---> > #! /u

Re: Sending files efficiently with Net::SMTP

2012-04-02 Thread Jenda Krynicky
From: mailing lists > 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 error: unable

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 f

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 > 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 > each method. To automa

Re: module for development

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

Re: XML suggestions

2011-07-20 Thread Jenda Krynicky
From: Rob Coops > 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 simple to set i

Re: Nature of this list

2011-04-26 Thread Jenda Krynicky
From: Raymond Wan > 2011/4/25 Jenda Krynicky : > > From: Raymond Wan > >> 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 that is

Re: Nature of this list

2011-04-25 Thread Jenda Krynicky
From: Raymond Wan > >> 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 > 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 program to tell ea

Re: sample distribution

2011-04-20 Thread Jenda Krynicky
From: Peter Scott > 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 and W

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)=@; > > > > 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 exponentiation (in Pe

Re: Dynamic replacement of the variable

2011-04-19 Thread Jenda Krynicky
From: Rob Dixon > 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> com

Re: Dynamic replacement of the variable

2011-04-19 Thread Jenda Krynicky
From: Shlomi Fish > On Monday 18 Apr 2011 08:50:43 Uri Guttman wrote: > > > "SF" == Shlomi Fish 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" == marcos

Re: Changing XML Tag Value in Perl

2011-04-19 Thread Jenda Krynicky
From: Rajpreet > 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 handler. I do get d

Re: transposing %d values to %x output

2011-03-30 Thread Jenda Krynicky
From: Jim Gibson > 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 ASCII dig

Re: Garbled lines

2011-03-28 Thread Jenda Krynicky
From: "HACKER Nora" > 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: > > > > Obviously, two insert sta

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

2011-01-14 Thread Jenda Krynicky
From: Saqib Ali > 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 meter > during t

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" > From: "Jenda Krynicky" > >> 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. M

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" > 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 reads what's

Re: XML Challenge Cannot

2010-12-18 Thread Jenda Krynicky
From: Chaitanya Yanamadala > 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 find out that the ti

Re: Strategy for diagnosing context-sensitive bug

2010-12-13 Thread Jenda Krynicky
From: Rob Dixon > 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=27&view=markup > > > > The error occurs at line 1297. > > So the line in question is > >@res = (split

Re: Object introspection + adding method

2010-10-24 Thread Jenda Krynicky
From: "Jeff Peng" > > 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 l

Re: Perl obfuscator

2010-08-22 Thread Jenda Krynicky
From: Shawn H Corey > 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. > > > > It's no

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

2010-06-30 Thread Jenda Krynicky
From: Jason Feng > 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. On the second

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

Re: Simple, synchronous interaction with a local server process

2010-06-27 Thread Jenda Krynicky
From: Chap Harrison > 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 *thin

Re: Simple, synchronous interaction with a local server process

2010-06-26 Thread Jenda Krynicky
From: Chap Harrison > 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 a query on

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 To: robert Key Copies to: beginners@perl.org > 2010/6/16 robert Key : > > Hi I would like to parse

Re: Edit large data file

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

Re: XML output processing question

2010-06-26 Thread Jenda Krynicky
From: saw > Given one large XML file such as: > > > > > > > > > I want to create many small XML files consisting of a Root element and > the sub-tree. I would like to copy the sub-tree from input to > output as a block without having to address the sub-components. I ha

Re: Here Docs

2010-06-02 Thread Jenda Krynicky
From: "Uri Guttman" > >>>>> "JK" == Jenda Krynicky writes: > > JK> From: "Joseph L. Casale" > >> Inside a here doc, how can I force an expression to be evaluated > >> such as localtime: > > here docs are

Re: get acl's of directory

2010-06-01 Thread Jenda Krynicky
From: Andreas Moroder 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 there. Jenda = je.

Re: Here Docs

2010-06-01 Thread Jenda Krynicky
From: "Joseph L. Casale" > 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 - http://search.cpan.org

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

2010-04-17 Thread Jenda Krynicky
From: Parag Kalra Date sent: Thu, 8 Apr 2010 22:34:21 -0700 Subject:How to create DSN on Solaris for Win32::ODBC To: Perl Beginners > Hi All, > > I am planing to use Win32::ODBC to connect to SQL Server from Solaris > through Perl. You can't. Win32::ODBC only works under Win

Re: [Was XS linker]

2010-04-12 Thread Jenda Krynicky
From: Rene Schickbauer > 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, commercial registration

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

2010-02-25 Thread Jenda Krynicky
From: Erik Lewis > 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 it overwhelm

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

2010-02-25 Thread Jenda Krynicky
From: Erik Lewis > > 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 your goo

Re: XML::Simple parsing with attributes

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

Re: XML::Simple parsing with attributes

2010-01-21 Thread Jenda Krynicky
From: Shlomi Fish > > 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 {{{ Hello this is a href="http://www.example.tld/";>link for something }}}, then > XML-S

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 To: Perl Beginners List > Anybody here familiar with XML::Simple? I need to parse some XML that > looks like this: > > > > bas

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

2010-01-04 Thread Jenda Krynicky
From: Peng Yu > 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 longer > than the

Re: Clone an object

2009-12-31 Thread Jenda Krynicky
From: Erez Schatz > 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 === http://Jenda.Krynicky.cz ===

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

Re: XML::Simple question

2009-12-22 Thread Jenda Krynicky
From: "Mike Blezien" > 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 the module. Is th

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

2009-12-22 Thread Jenda Krynicky
From: Marc Perry > 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 list operat

Re: what's a database handler

2009-12-21 Thread Jenda Krynicky
From: Xiao Lan (a°a...°) > 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 are allowed to g

Re: capture error - the better way?

2009-12-16 Thread Jenda Krynicky
From: Philip Potter > 2009/12/16 Shlomi Fish : > > 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 general, it is the duty of an optimi

Re: Help me understand

2009-12-05 Thread Jenda Krynicky
From: 120 > 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. $self is se

Re: speed test

2009-12-04 Thread Jenda Krynicky
From: Rob Coops > > 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 that will ou

Re: Assignment Operator

2009-11-28 Thread Jenda Krynicky
From: Marco Pacini 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 paragraph "Assignm

Re: 答复: the question of one program

2009-11-23 Thread Jenda Krynicky
From: Philip Potter > 2009/11/20 gaochong : > > 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 result, be selective with what you dow

Re: Trace used functions within an app

2009-11-07 Thread Jenda Krynicky
From: Dermot > 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 clarity, simplicit

Re: Sorting mixed alphanumerics

2009-10-14 Thread Jenda Krynicky
From: Shawn H Corey > 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, tha

Re: Sorting mixed alphanumerics

2009-10-14 Thread Jenda Krynicky
Date sent: Wed, 14 Oct 2009 11:03:13 -0400 From: Shawn H Corey To: Rick Triplett Copies to: Perl Beginners Subject:Re: Sorting mixed alphanumerics > Rick Triplett wrote: > > I need to sort the keys in a hash. The ke

Re: eval and next

2009-10-07 Thread Jenda Krynicky
Date sent: Tue, 06 Oct 2009 15:45:44 +0200 From: Alexander Koenig To: beginners Subject:eval and next > Hi all, > > I have a Perl program where I use eval to catch errors. As they are Java > errors (via Inline::Java) I want my p

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

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" Copies to: beginners@perl.org > Soham Das wrote: > > Hello All, > > > > I wanted

Re: typical errors beginners make

2009-09-19 Thread Jenda Krynicky
From: Gabor Szabo > 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: > /home/gabor/perl5lib/lib/perl5/site_perl/5.10.0/i486-

Re: text html from file to a scalar and mail

2009-09-12 Thread Jenda Krynicky
From: Shlomi Fish > > 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 di

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 To: Perl > Dear All, > > Can we develop application which will watch a specific folder and when > any files comes into the folder

Re: Perl's superior text parsing power

2009-09-03 Thread Jenda Krynicky
From: "Shawn H. Corey" > 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 case (thanks

Re: search replace saved to a variable

2009-09-03 Thread Jenda Krynicky
From: Noah Garrett Wallach > 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 anything may be writen

Re: Creating array variable names on the fly

2009-08-28 Thread Jenda Krynicky
From: ANJAN PURKAYASTHA > 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 processed (in this case 7).

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

2009-08-26 Thread Jenda Krynicky
From: Tony Esposito > 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 able to print to ST

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 Subject:removing a 'tee'd file handles going forward To: Beginners Perl > I want to output to both STDOUT and STDERR at one point in my program, then > want to separate the two handles going forward in the p

Re: Procedural modules in an object-oriented project

2009-08-18 Thread Jenda Krynicky
From: Steve Bertrand > 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 that I can

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 > 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 for free for s

Re: Coding best practices

2009-08-14 Thread Jenda Krynicky
From: "Shawn H. Corey" > 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 them. So they

Re: IO::File close on undef behaviour?

2009-08-12 Thread Jenda Krynicky
From: Philip Potter > 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 in the reference

Re: Inverting a hash safely

2009-08-03 Thread Jenda Krynicky
From: "Shawn H. Corey" > 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 someth

Re: Inverting a hash safely

2009-08-03 Thread Jenda Krynicky
From: Ed Avis > Jenda Krynicky 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; # thr

Re: while (<>) and wildcards on DOS/Windows

2009-08-03 Thread Jenda Krynicky
From: Peter Daum > 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 script as a fi

Re: Inverting a hash safely

2009-08-03 Thread Jenda Krynicky
From: Ed Avis > 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 %hash; # thr

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 To: Perl Beginners Subject:Need help with Mail::Sender > Greetings; > > Following the docs I have it working, somewhat, but it is > not handling html w/inline images

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 ST

Re: question about constants

2009-06-24 Thread Jenda Krynicky
Steve Bertrand wrote: > Roman Makurin wrote: > > On Wed, Jun 24, 2009 at 03:25:57PM +0200, Jenda Krynicky wrote: > >> From: Roman Makurin > >>> here is complite perl script which produces such results without > >>> any warning: > >>> &

Re: question about constants

2009-06-24 Thread Jenda Krynicky
From: Roman Makurin > 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 eval usage

2009-06-23 Thread Jenda Krynicky
From: Paul Johnson > On Tue, Jun 23, 2009 at 06:35:26PM +0200, Jenda Krynicky wrote: > > From: Roman Makurin > > > On Tue, Jun 23, 2009 at 12:46:33PM +0200, Jenda Krynicky wrote: > > > > From: Roman Makurin > > > > > Just looked throught some standa

Re: question about eval usage

2009-06-23 Thread Jenda Krynicky
From: Roman Makurin > On Tue, Jun 23, 2009 at 12:46:33PM +0200, Jenda Krynicky wrote: > > From: Roman Makurin > > > Just looked throught some standart perl modules and found > > > something cryptic to myself: > > > > > > package Module; > &g

Re: question about eval usage

2009-06-23 Thread Jenda Krynicky
From: Roman Makurin > 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 skipped some

Re: Need help with Email::Send

2009-06-22 Thread Jenda Krynicky
From: "Dennis G. Wicks" > Jeff Pang wrote the following on 06/21/2009 09:51 PM: > > 2009/6/22 Dennis G. Wicks : > >> 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 but I > >> haven't

Re: Please, I need help!!!

2009-06-12 Thread Jenda Krynicky
From: Jim Gibson > On 6/11/09 Thu Jun 11, 2009 11:00 AM, "Phillip" > 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 after this one.how can i

Re: better way to write this

2009-06-11 Thread Jenda Krynicky
From: "John W. Krahn" > Jenda Krynicky wrote: > > From: "raphael()" > >> 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

Re: better way to write this

2009-06-11 Thread Jenda Krynicky
From: "raphael()" > 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 read a little

  1   2   3   4   5   6   7   8   9   10   >