Re: Guidance for a New Programmer/Perl User
Ken == Ken Peng short...@gmail.com writes: Ken I am 33 years old. Can I have the chance to see Perl6's official Ken stable release in my left life? Nobody is ever going to declare Perl 6 Stable. It will always be a moving target. Much the same way that Perl 5 is now... Perl 5 is hardly stable. :) Perhaps the word you're looking for is usable for *my* applications. But to answer that, you must first define your requirements. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.posterous.com/ for Smalltalk discussion -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
On 2011-12-15 22:53, Rajeev Prasad wrote: perl5 is dead end OTOH, Perl 5 is alive and kicking. See for example: http://www.perlfoundation.org/ http://www.slideshare.net/Tim.Bunce/perl-myths-200909 http://www.booking.com/hotel/de/sonnenhof-perl.en.html -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
On Thu, 15 Dec 2011 13:53:33 -0800 (PST) Rajeev Prasad rp.ne...@yahoo.com wrote: Shlomi, all of you said is correct, but some may get a negative impression. it shows as if perl5 and perl 6 are two very different. Well, Perl 5 and Perl 6 are very different. perl5 is dead end (coz perl 6 is not like 5), perl6 which is in making for so long is still not ready. I specifically said that Perl 5 and its perl 5 implementation are not going away and will be usable (and used) for years to come. The perl 5 implementation is also actively developed by the perl5-porters and now standardised on a yearly release schedule. Regarding Perl 6 - you are right that it is taking a long time, and that some people feel its implementations are not usable for them yet. But it doesn't mean you can't use Perl 5 now, or that Perl 6 will never be ready, or that it didn't have a positive influence on Perl 5. for a new person, this could mean less confidence in perl and more interest towards php etc... ty. Well, I still think it turned out that it wasn't a good idea to call Perl 6, Perl 6, but it's too late to revert that decision now. Regards, Shlomi Fish Rajeev -- - Shlomi Fish http://www.shlomifish.org/ First stop for Perl beginners - http://perl-begin.org/ When Chuck Norris uses git, he takes a coffee break after initiating every git commit. And then he waits for the commit to finish. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
2011/12/16 Shlomi Fish shlo...@shlomifish.org: Regarding Perl 6 - you are right that it is taking a long time, and that some people feel its implementations are not usable for them yet. But it doesn't mean you can't use Perl 5 now, or that Perl 6 will never be ready, or that it didn't have a positive influence on Perl 5. I am 33 years old. Can I have the chance to see Perl6's official stable release in my left life? Regards, Ken -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
Hi Rob, On Thu, 15 Dec 2011 22:27:22 + Rob Dixon rob.di...@gmx.com wrote: Decades of programming in many languages have convinced me that Perl excels in every aspect. But I have to agree with Rajeev that Perl 6 has become a theory and needs evidence of practical application. In my mind there is no doubt of the benefits in Perl, but what place does it have? And what are its competitors? As CGI, Perl falls behind PHP by having to 'print' the entire HTML page. First of all, there are code-inside-markup solutions for Perl: * http://search.cpan.org/dist/HTML-Mason/ * http://search.cpan.org/dist/Apache-ASP/ * http://search.cpan.org/dist/Embperl/ So you can use it in a similar manner to PHP, if you desire. Moreover, I feel that that inside-out language approach is not very useful in the more complex cases of having a common look and feel, and generating more complex and dynamic HTML. Larry Wall's first language was an inside-out one, BTW, but he understood why it wasn't such a good idea by the time he started Perl. Someone on the Joel-on-Software forum, I believe, said they just put all of their PHP code inside a gigantic ?php ... ? and avoid its inside-out behaviour. So what is its place? Well, Perl is a general-purpose language, so you can use it for many kinds of task. See: http://perl-begin.org/uses/ Regards, Shlomi Fish -- - Shlomi Fish http://www.shlomifish.org/ The Human Hacking Field Guide - http://shlom.in/hhfg “I’m not straight — I’m Israeli.” Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
Not to sound like I am complaining, but aren't we kind of wondering of my original topic? I will say that Perl 5 is the road I need to travel since it is heavily utilized here at the University. I do want to say thank you for the links at other reading recommendations that have been provided up to this point. Mark On 12/16/2011 4:44 AM, Shlomi Fish wrote: Hi Rob, On Thu, 15 Dec 2011 22:27:22 + Rob Dixonrob.di...@gmx.com wrote: Decades of programming in many languages have convinced me that Perl excels in every aspect. But I have to agree with Rajeev that Perl 6 has become a theory and needs evidence of practical application. In my mind there is no doubt of the benefits in Perl, but what place does it have? And what are its competitors? As CGI, Perl falls behind PHP by having to 'print' the entire HTML page. First of all, there are code-inside-markup solutions for Perl: * http://search.cpan.org/dist/HTML-Mason/ * http://search.cpan.org/dist/Apache-ASP/ * http://search.cpan.org/dist/Embperl/ So you can use it in a similar manner to PHP, if you desire. Moreover, I feel that that inside-out language approach is not very useful in the more complex cases of having a common look and feel, and generating more complex and dynamic HTML. Larry Wall's first language was an inside-out one, BTW, but he understood why it wasn't such a good idea by the time he started Perl. Someone on the Joel-on-Software forum, I believe, said they just put all of their PHP code inside a gigantic?php ... ? and avoid its inside-out behaviour. So what is its place? Well, Perl is a general-purpose language, so you can use it for many kinds of task. See: http://perl-begin.org/uses/ Regards, Shlomi Fish -- Mark C. Tiesman Campus Network Services Division of Information Technology (DoIT) University of Wisconsin - Madison 1210 W Dayton St Rm B116 608.264.4357 - Help Desk 608.890.3940 - Office ties...@wisc.edu -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
On Friday, December 16, 2011 at 09:18 , Mark Tiesman wrote: Not to sound like I am complaining, but aren't we kind of wondering of my original topic? I will say that Perl 5 is the road I need to travel since it is heavily utilized here at the University. Yes, parts of the discussion have been pushing up against the not really on topic for the beginners list boundary -- not quite to the point where I felt like I needed to ask people to knock it off, but close. (And maybe I was overly tolerant? 8^ ) Anyway, if we could try to re-focus future responses on the original question, and take the Perl 5 vs Perl 6 discussion elsewhere, that would be good. thx, john, aka perl-beginners list mom. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
On Dec 16, 3:39 pm, short...@gmail.com (Ken Peng) wrote: 2011/12/16 Shlomi Fish shlo...@shlomifish.org: Regarding Perl 6 - you are right that it is taking a long time, and that some people feel its implementations are not usable for them yet. But it doesn't mean you can't use Perl 5 now, or that Perl 6 will never be ready, or that it didn't have a positive influence on Perl 5. I am 33 years old. Can I have the chance to see Perl6's official stable release in my left life? Regards, Ken Part of the issue is what do you determine as a release of Perl6 and what do you determine as stable? It is true that at the moment the Perl6 team do not call their releases the official first version because it hasn't yet met its language definition, and to me that's the point. Perl6 is a language definition, it is a standard that is being aimed for and one that has matured and evolved during its creation, we may never reach an end point to that but that doesn't mean you can't use Perl6 right now. You can use Perl6 projects such as Rakudo. Rakudo right now has stable point releases and is a long way towards a full implementation release of Perl6. Perl5 however is a language implementation. Perl5 has ported features from the Perl6 definition into itself and has continued to evolve with yearly point releases and a long term project to evolve the core. So why are you waiting to use Perl 6. You have implementations of Perl6 in you lifetime right now. You also have Perl5 which is widely used in development and deployment and is being evolved. As for the positive influence. Once, long ago Perl6 held up Perl5 development as people to my understanding went into a maint. mode waiting for Perl6. This ended and we have come a long way from then, I think that was around 5.8. Since then we have had major release of Perl 5.10 and moved onto a yearly schedule with 5.12 and 5.14. We also have projects such as Moose and its Roles which comes from perl6. 5.15 has been in the wild for 7 months or so and many of its features will make up Perl 5.16 and you can search for blogs (blogs.perl.org and ironman.enlightenedperl.org) to find info on the future evolution of Perl5 (I would follow the current PumpKing @rjbs (Ricardo Signes) as well as the previous Pump. Jesse Vincent who talk about this subject with far greater accuracy and understanding than I ever could. This argument about the implementation of Perl6, waiting, yada yada, is old. in fact it is about 4 years old and therefore stunningly out of date. It neither reflects or comments on the current situation with either Perl5 or Perl6 and their derivatives. Anyone indulging in it is to my mind mostly wasting their time and haven't engaged enough with the community to learn where we are. The best thing we can do is point them at the various newsgroups, irc channels, blogs and social media presences in the hope of bringing them up to date. If you want to contribute towards updating the Perl5 and Perl6 wikis etc. which are a cause of some of this cruft information then get in touch. Projects like Perl FAQs are already undergoing a major renovation and we have been redesigning many of the Perl sites. --By Mark Keating. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
On 12/15/2011 11:34 PM, abhay vyas wrote: Which book of Llama are you reading? pls tell me the title as I am also on same page as yors. I read Learning Perl, 2 e., ~13 years ago. David -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Guidance for a New Programmer/Perl User
Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! -- Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
Thanks Frank. I'll add that to my list. ;-) Mark On 12/15/2011 10:07 AM, frank cui wrote: I found Perl By Example 4th Edition book pretty help, and you may want to give a look on that one. Frank On Thu, Dec 15, 2011 at 11:54 AM, Mark Tiesman mark.ties...@doit.wisc.edu mailto:mark.ties...@doit.wisc.edu wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! -- Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org mailto:beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org mailto:beginners-h...@perl.org http://learn.perl.org/ -- Mark C. Tiesman Campus Network Services Division of Information Technology (DoIT) University of Wisconsin - Madison 1210 W Dayton St Rm B116 608.264.4357 - Help Desk 608.890.3940 - Office ties...@wisc.edu
Re: Guidance for a New Programmer/Perl User
perlmonks.org is a good site. regards... /om On Dec 15, 2011, at 21:38, Mark Tiesman mark.ties...@doit.wisc.edu wrote: Thanks Frank. I'll add that to my list. ;-) Mark On 12/15/2011 10:07 AM, frank cui wrote: I found Perl By Example 4th Edition book pretty help, and you may want to give a look on that one. Frank On Thu, Dec 15, 2011 at 11:54 AM, Mark Tiesman mark.ties...@doit.wisc.edu mailto:mark.ties...@doit.wisc.edu wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! -- Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org mailto:beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org mailto:beginners-h...@perl.org http://learn.perl.org/ -- Mark C. Tiesman Campus Network Services Division of Information Technology (DoIT) University of Wisconsin - Madison 1210 W Dayton St Rm B116 608.264.4357 - Help Desk 608.890.3940 - Office ties...@wisc.edu -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
2011/12/15 Mark Tiesman mark.ties...@doit.wisc.edu Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! -- Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ Hi, If you want to learn real word perl programming, Automating System Administration with Perl by David N. Blank-Edelman is a good follow up after the Llama book.http://www.amazon.com/David-N.-Blank-Edelman/e/B001I0WHFW/ref=sr_ntt_srch_lnk_1?qid=1323965602sr=8-1http://www.amazon.com/Automating-System-Administration-Perl-Efficient/dp/059600639X/ref=sr_1_1?ie=UTF8qid=1323965602sr=8-1
Re: Guidance for a New Programmer/Perl User
On Thu, Dec 15, 2011 at 9:24 PM, Mark Tiesman mark.ties...@doit.wisc.edu wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! here is a blog i maintain , and update it with useful links i come across now and then ... hope it help you out http://linuxwalk.blogspot.com/ -- Regards Agnello D'souza -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
*http://www.chankeypathak.com/search/label/Perl* * * On Thu, Dec 15, 2011 at 10:20 PM, Agnello George agnello.dso...@gmail.comwrote: On Thu, Dec 15, 2011 at 9:24 PM, Mark Tiesman mark.ties...@doit.wisc.edu wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! here is a blog i maintain , and update it with useful links i come across now and then ... hope it help you out http://linuxwalk.blogspot.com/ -- Regards Agnello D'souza -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- Regards, Chankey Pathak http://javaenthusiastic.blogspot.com
Re: Guidance for a New Programmer/Perl User
On 2011-12-15 16:54, Mark Tiesman wrote: general information on learning to program and Perl How to Perl: http://learn.perl.org/ which mentions: http://learn.perl.org/books/ -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
The Learning Perl by Randal Schwartz Video series is a nice intro: http://shop.oreilly.com/product/0636920014430.do Along with the companion book Learning Perl (6ed): http://shop.oreilly.com/product/0636920018452.do Lynda.com also offers Perl 5 Essential Training by Bill Weinman: http://www.lynda.com/Perl-5-tutorials/essential-training/61025-2.html If your company can pay for the training, O'reilly School can't hurt: http://www.oreillyschool.com/certificates/perl-programming.php Though they basically cover the O'reilly books. Juan Madrigal Web Developer Web and Emerging Technologies University of Miami Richter Library On 12/15/11 10:54 AM, Mark Tiesman mark.ties...@doit.wisc.edu wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! -- Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
Hi Mark, On Thu, 15 Dec 2011 09:54:17 -0600 Mark Tiesman mark.ties...@doit.wisc.edu wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! Some other people and I have concentrated many good resources for learning Perl here: http://perl-begin.org/ Hope it proves helpful. Regards, Shlomi Fish -- - Shlomi Fish http://www.shlomifish.org/ Optimising Code for Speed - http://shlom.in/optimise Larry Wall’s pure‐Perl code is faster than Assembly. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
shlomi, Thanks for the link. I have bookmarked:-) On 12/15/2011 11:56 AM, Shlomi Fish wrote: Hi Mark, On Thu, 15 Dec 2011 09:54:17 -0600 Mark Tiesmanmark.ties...@doit.wisc.edu wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! Some other people and I have concentrated many good resources for learning Perl here: http://perl-begin.org/ Hope it proves helpful. Regards, Shlomi Fish -- Mark C. Tiesman Campus Network Services Division of Information Technology (DoIT) University of Wisconsin - Madison 1210 W Dayton St Rm B116 608.264.4357 - Help Desk 608.890.3940 - Office ties...@wisc.edu -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
Here are some new videos: http://szabgab.com/perl_tutorial.html The standard stuff is here: http://www.perl.org/learn.html http://learn.perl.org/first_steps/http://learn.perl.org/ And this is what I was originally looking for: http://perl-tutorial.org/ It's a curated list of tutorials. On Thu, Dec 15, 2011 at 12:58 PM, Mark Tiesman mark.ties...@doit.wisc.eduwrote: shlomi, Thanks for the link. I have bookmarked:-) On 12/15/2011 11:56 AM, Shlomi Fish wrote: Hi Mark, On Thu, 15 Dec 2011 09:54:17 -0600 Mark Tiesmanmark.tiesman@doit.**wisc.edu mark.ties...@doit.wisc.edu wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! Some other people and I have concentrated many good resources for learning Perl here: http://perl-begin.org/ Hope it proves helpful. Regards, Shlomi Fish -- Mark C. Tiesman Campus Network Services Division of Information Technology (DoIT) University of Wisconsin - Madison 1210 W Dayton St Rm B116 608.264.4357 - Help Desk 608.890.3940 - Office ties...@wisc.edu -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
Mark, i think with an eye on future, you should start by reading Rakudo etc. i.e. perl6 From: Mark Tiesman mark.ties...@doit.wisc.edu To: beginners@perl.org Sent: Thursday, December 15, 2011 9:54 AM Subject: Guidance for a New Programmer/Perl User Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! -- Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
How quickly Perl 6 knowledge can be put to good use probably depends on where you work. I don't think there are many businesses where they are looking to convert their Perl 5 code to Perl 6 in the immediate future. Rajeev Prasad rp.ne...@yahoo.com wrote: Mark, i think with an eye on future, you should start by reading Rakudo etc. i.e. perl6 From: Mark Tiesman mark.ties...@doit.wisc.edu To: beginners@perl.org Sent: Thursday, December 15, 2011 9:54 AM Subject: Guidance for a New Programmer/Perl User Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. Thanks!! -- Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
Hi Rajeev, On Thu, 15 Dec 2011 15:20:24 -0500 Brendan bdgil...@gmail.com wrote: How quickly Perl 6 knowledge can be put to good use probably depends on where you work. I don't think there are many businesses where they are looking to convert their Perl 5 code to Perl 6 in the immediate future. Rajeev may wish to read http://perl-begin.org/learn/perl6/ about the relationship between Perl 5/perl 5 and Perl 6. Neither Perl 5 nor perl 5 are going away, and Perl 6 is a completely different language. Furthermore, the current Perl 6 implementations are incomplete (= don't implement the entire Perl 6 spec), and may not perform very well or have various bugs. I wouldn't want to discourage you from learning Perl 6, because it's an interesting language with many nifty features, but learning Perl 5 now will still prove useful for a very long term. Regards, Shlomi Fish Rajeev Prasad rp.ne...@yahoo.com wrote: Mark, i think with an eye on future, you should start by reading Rakudo etc. i.e. perl6 -- - Shlomi Fish http://www.shlomifish.org/ Stop Using MSIE - http://www.shlomifish.org/no-ie/ There is no IGLU Cabal! Home‐made Cabals eventually superseded the power and influence of the original IGLU Cabal, which was considered a cutting edge development at its time. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
Shlomi, all of you said is correct, but some may get a negative impression. it shows as if perl5 and perl 6 are two very different. perl5 is dead end (coz perl 6 is not like 5), perl6 which is in making for so long is still not ready. for a new person, this could mean less confidence in perl and more interest towards php etc... ty. Rajeev From: Shlomi Fish shlo...@shlomifish.org To: Brendan bdgil...@gmail.com Cc: Rajeev Prasad rp.ne...@yahoo.com; Mark Tiesman mark.ties...@doit.wisc.edu; beginners@perl.org beginners@perl.org Sent: Thursday, December 15, 2011 2:45 PM Subject: Re: Guidance for a New Programmer/Perl User Hi Rajeev, On Thu, 15 Dec 2011 15:20:24 -0500 Brendan bdgil...@gmail.com wrote: How quickly Perl 6 knowledge can be put to good use probably depends on where you work. I don't think there are many businesses where they are looking to convert their Perl 5 code to Perl 6 in the immediate future. Rajeev may wish to read http://perl-begin.org/learn/perl6/ about the relationship between Perl 5/perl 5 and Perl 6. Neither Perl 5 nor perl 5 are going away, and Perl 6 is a completely different language. Furthermore, the current Perl 6 implementations are incomplete (= don't implement the entire Perl 6 spec), and may not perform very well or have various bugs. I wouldn't want to discourage you from learning Perl 6, because it's an interesting language with many nifty features, but learning Perl 5 now will still prove useful for a very long term. Regards, Shlomi Fish Rajeev Prasad rp.ne...@yahoo.com wrote: Mark, i think with an eye on future, you should start by reading Rakudo etc. i.e. perl6 -- - Shlomi Fish http://www.shlomifish.org/ Stop Using MSIE - http://www.shlomifish.org/no-ie/ There is no IGLU Cabal! Home‐made Cabals eventually superseded the power and influence of the original IGLU Cabal, which was considered a cutting edge development at its time. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
for a new person, this could mean less confidence in perl and more interest towards php etc... ty. Rajeev Hi Rajeev, The idea is not to curry favour with one language or another, but help a person get on with what they're doing. If Mark needs to know Perl for his job, then I think we can safely assume it's Perl 5 that is being discussed. I don't think Shlomi meant to imply (or implied) P5 is a dead end—indeed, it's not—but that learning Perl 6, or some implementation (which may or may not end up being finished/abandoned/?), will not help Mark with his job. more interest towards php is not a valid concern because a) we're not trying to stop 'our people' going to 'their people', we're trying to help people get things done, and b) Mark didn't come to Perl, Perl came to Mark, so it's not like there's any worry that he'll choose something else. ;-) Best of luck to you all, Anneli From: Shlomi Fish shlo...@shlomifish.org To: Brendan bdgil...@gmail.com Cc: Rajeev Prasad rp.ne...@yahoo.com; Mark Tiesman mark.ties...@doit.wisc.edu; beginners@perl.org beginners@perl.org Sent: Thursday, December 15, 2011 2:45 PM Subject: Re: Guidance for a New Programmer/Perl User Hi Rajeev, On Thu, 15 Dec 2011 15:20:24 -0500 Brendan bdgil...@gmail.com wrote: How quickly Perl 6 knowledge can be put to good use probably depends on where you work. I don't think there are many businesses where they are looking to convert their Perl 5 code to Perl 6 in the immediate future. Rajeev may wish to read http://perl-begin.org/learn/perl6/ about the relationship between Perl 5/perl 5 and Perl 6. Neither Perl 5 nor perl 5 are going away, and Perl 6 is a completely different language. Furthermore, the current Perl 6 implementations are incomplete (= don't implement the entire Perl 6 spec), and may not perform very well or have various bugs. I wouldn't want to discourage you from learning Perl 6, because it's an interesting language with many nifty features, but learning Perl 5 now will still prove useful for a very long term. Regards, Shlomi Fish Rajeev Prasad rp.ne...@yahoo.com wrote: Mark, i think with an eye on future, you should start by reading Rakudo etc. i.e. perl6 -- - Shlomi Fish http://www.shlomifish.org/ Stop Using MSIE - http://www.shlomifish.org/no-ie/ There is no IGLU Cabal! Home‐made Cabals eventually superseded the power and influence of the original IGLU Cabal, which was considered a cutting edge development at its time. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
Decades of programming in many languages have convinced me that Perl excels in every aspect. But I have to agree with Rajeev that Perl 6 has become a theory and needs evidence of practical application. In my mind there is no doubt of the benefits in Perl, but what place does it have? And what are its competitors? As CGI, Perl falls behind PHP by having to 'print' the entire HTML page. So what is its place? Rob On 15/12/2011 21:53, Rajeev Prasad wrote: Shlomi, all of you said is correct, but some may get a negative impression. it shows as if perl5 and perl 6 are two very different. perl5 is dead end (coz perl 6 is not like 5), perl6 which is in making for so long is still not ready. for a new person, this could mean less confidence in perl and more interest towards php etc... ty. Rajeev From: Shlomi Fishshlo...@shlomifish.org How quickly Perl 6 knowledge can be put to good use probably depends on where you work. I don't think there are many businesses where they are looking to convert their Perl 5 code to Perl 6 in the immediate future. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
Have you looked at these MVC perl frameworks and alternatives to CGI? They definitely go beyond a simple print. mojolicious http://mojolicio.us/ dancer http://perldancer.org/ Catalyst http://www.catalystframework.org/ Web.pm https://github.com/masak/web psgi http://plackperl.org/ mod_parrot/mod_perl6 http://parrot.org/mod_parrot -Juan Sent from my iPad On Dec 15, 2011, at 5:33 PM, Rob Dixon rob.di...@gmx.com wrote: Decades of programming in many languages have convinced me that Perl excels in every aspect. But I have to agree with Rajeev that Perl 6 has become a theory and needs evidence of practical application. In my mind there is no doubt of the benefits in Perl, but what place does it have? And what are its competitors? As CGI, Perl falls behind PHP by having to 'print' the entire HTML page. So what is its place? Rob On 15/12/2011 21:53, Rajeev Prasad wrote: Shlomi, all of you said is correct, but some may get a negative impression. it shows as if perl5 and perl 6 are two very different. perl5 is dead end (coz perl 6 is not like 5), perl6 which is in making for so long is still not ready. for a new person, this could mean less confidence in perl and more interest towards php etc... ty. Rajeev From: Shlomi Fishshlo...@shlomifish.org How quickly Perl 6 knowledge can be put to good use probably depends on where you work. I don't think there are many businesses where they are looking to convert their Perl 5 code to Perl 6 in the immediate future. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Guidance for a New Programmer/Perl User
On 12/15/2011 07:54 AM, Mark Tiesman wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition advice, reading material, classes, and general information on learning to program and Perl. Any help provided is GREATLY appreciated. http://www.mail-archive.com/beginners@perl.org/msg100200.html HTH, David -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
new to perl!
is there any where I could join some kind of development/project team related to perl, and learn from them, and maybe hopefully contribute something? I would really enjoy an environment like this.
Re: new to perl!
Checkout www.sf.net and search by programming language you will see many open source Perl projects to choose from. Sent from my iPhone 3GS. On Oct 1, 2009, at 8:12 AM, Xeon Solixa xeonx.solixash...@gmail.com wrote: is there any where I could join some kind of development/project team related to perl, and learn from them, and maybe hopefully contribute something? I would really enjoy an environment like this. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: new to perl!
2009/10/1 Xeon Solixa xeonx.solixash...@gmail.com: is there any where I could join some kind of development/project team related to perl, and learn from them, and maybe hopefully contribute something? I would really enjoy an environment like this. This has actually been covered very recently on this mailling list. Uri in fact called on newbies to rise to such a challenge: http://www.nntp.perl.org/group/perl.beginners/2009/09/msg108992.html The original thread is here: http://www.nntp.perl.org/group/perl.beginners/2009/09/msg108963.html I hope this helps; but if you have any followup questions, feel free to ask here! Philip -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: New to Perl
Hi, You can get the ppms from the below links, http://trouchelle.com/ppm/ hope this help, Thanks, Prabu.M.A Jeff Pang [EMAIL PROTECTED] wrote: -Original Message- From: Gladstone Daniel - dglads Sent: Aug 10, 2007 9:39 PM To: beginners@perl.org Subject: New to Perl Good Morning all, 1) I am new to Perl 2) Running ActiveState Perl 3) Trying to find/install a module: Spreadsheet::WriteExcel 4) Can anyone provide me instruction on: a) where and how I can get it? b) How to install it on my PC When you installed ActiveState Perl,you also got their Perl Package Manager.You can install packages from it. -- Jeff Pang http://home.arcor.de/jeffpang/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ - Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos more.
New to Perl
Good Morning all, 1) I am new to Perl 2) Running ActiveState Perl 3) Trying to find/install a module: Spreadsheet::WriteExcel 4) Can anyone provide me instruction on: a) where and how I can get it? b) How to install it on my PC Thanks Daniel H Gladstone * The information contained in this communication is confidential, is intended only for the use of the recipient named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please resend this communication to the sender and delete the original message or any copy of it from your computer system. Thank you. * -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: New to Perl
On Fri, 2007-08-10 at 08:39 -0500, Gladstone Daniel - dglads wrote: Good Morning all, 1) I am new to Perl 2) Running ActiveState Perl 3) Trying to find/install a module: Spreadsheet::WriteExcel 4) Can anyone provide me instruction on: a) where and how I can get it? b) How to install it on my PC Perl package manager or ppm. This is the ActiveState version of cpan. http://aspn.activestate.com/ASPN/docs/ActivePerl/5.8/faq/ActivePerl-faq2.html -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: New to Perl
-Original Message- From: Gladstone Daniel - dglads [EMAIL PROTECTED] Sent: Aug 10, 2007 9:39 PM To: beginners@perl.org Subject: New to Perl Good Morning all, 1) I am new to Perl 2) Running ActiveState Perl 3) Trying to find/install a module: Spreadsheet::WriteExcel 4) Can anyone provide me instruction on: a) where and how I can get it? b) How to install it on my PC When you installed ActiveState Perl,you also got their Perl Package Manager.You can install packages from it. -- Jeff Pang [EMAIL PROTECTED] http://home.arcor.de/jeffpang/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
New to Perl....
I am not sure where to post this but I would go straight to the point. I have been in the IT field for 5yrs working more as an Oracle developer . However, I just got a job as the Operations / QA manager. It's a new post and so am I kinda new to it. My boss has high regards for me and specifically requested I join the company despite my being novice to this post. I am expected to monitor the uptime, throughput; server log files etc. Look for respond to abnormalities; manage benchmark, manage hosting usuage and check websites for W3C compliance. (There is Linux, MySQL, Perl on all the servers). However, my boss just asked me for a flowchart / perl script to monitor the following:- -webserver, -Db server, -chat. Where do I start from... I have just 2 hrs to come up with the miracle solution I would appreciate any advice.. I forgot to ask for the necessary training I would need to fulfil my postion as Operation / QA Manager about from the book I have bought on Perl, Linux Admin as well as PHP MySQL - New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.
Re: New to Perl....
Omabele, I'd say you need to determine the requirements (like what needs to be monitored), and then choose the tools best suited to meet those requirements. Chances are that Perl alone will not be the final solution to all of your monitoring needs. There are many freely available network and device monitoring tools, so there's really no reason for you to try to reinvent the wheel in two hours. Stephen Kratzer CTI Networks, Inc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New to Perl....
On Tue, 28 Mar 2006, Omabele Onome wrote: However, my boss just asked me for a flowchart / perl script to monitor the following:- -webserver, -Db server, -chat. Where do I start from... I have just 2 hrs to come up with the miracle solution This list isn't your best hope then. We're here to critique code, not teach people how to do their jobs. Your best bet may be one of the system monitoring setups that sits on top of SNMP -- MRTG is one, but there are others as well. These don't tend to do quite what you're asking for -- I haven't seen one that did flow charts, though a lot of them have plugins for different types of reports that may include such diagrams -- but at least it does the bulk of the setup work for you. Good luck. -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New to Perl....
Omabele Onome wrote: Hello Omabele, I am expected to monitor the uptime, throughput; server log files etc. Look for respond to abnormalities; manage benchmark, manage hosting usuage and check websites for W3C compliance. (There is Linux, MySQL, Perl on all the servers). Persoanlly, I'd start by breaking it all up into coherent chunks of tasks. Then for each task I'd see if a tool already exists and use that. There's likely modules related to the task at search.cpan.org you can use to create new tools if none exist. However, my boss just asked me for a flowchart / perl script to monitor the following:- -webserver, -Db server, -chat. Where do I start from... I have just 2 hrs to come up with the miracle solution I would appreciate any advice.. Step one would be to reason with your boss that 2 hours is completely unreasonable to make such a system, even if you'd personally designed the network and new ever inch of it like the back of your hand. If your boss still expects a two hour solution you have 2 options: a) google for tools that do all of the stuff you need b) tell your boss he's friggin' idiot and walk out :) Step two is the process I outlined above. While perl can definately be used to accomplish all of your goals, this list may not be the best place to post a how-to question to since this list is to help people with existing code they are struggling with. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Need RE. New to Perl
Keith Worthington wrote: Hi All, Hello, I am new to the list and need some quick help. I have been kicking around with vi and sed for years but never took the time to learn Perl. Now I need to use Perl and could really use a jumpstart. I am writing a function in the Postgresql database using Perl because of its text processing power. My other options are less than pretty. :-( I will be processing inputs like the following: 815 HTPP Black 2in sq Border: RMFP025BK Size: 7'10 x 16' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 17' x 50' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 12' x 12'2 Tag: None Netform Lily Pad Net Size: 5' X 32' W L Body Length:24' Rope Color:Yellow Joint Color:Red 1250 HTPP Black Bonded 2in sq Border: RMFP025BK Size: 39 X 100' Tag: None 1250 HTPP Black Bonded 2in sq Border: RMFP025BK Size: 83 X 40' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 16'6 x 21'3 Tag: None 250 HTPP Black 1in sq Border: TW84NTBK Size: 9' x 25' Tag: 200' sec 1250 HTPP Yellow 2in sq Border: TW84NYYL Size: 6'1 x 12'7 Tag: 1855mm x 3840mm I need to parse them up into the pieces Border, Size and Tag. Furthermore I need to break up the Size piece into width and length components, feet and inches. Using the first example I would like to obtain: 'RMFP025BK' 7 10 16 0 '' (or NULL) Any help would be appreciated. This appears to do what you want: while ( DATA ) { next unless / Border: \s* (.+?) \s+ Size: \s* (?:(\d+)')? (?:(\d+))? \s*x\s* (?:(\d+)')? (?:(\d+))? \s+ Tag:\s* (.*) /ix; print Border: $1 , 'Size: ', $2 ? $2 feet : '', $3 ? $3 inches : '', 'by ', $4 ? $4 feet : '', $5 ? $5 inches : '', 'Tag: ', \L$6 eq 'none' ? '' : $6, \n; } __DATA__ 815 HTPP Black 2in sq Border: RMFP025BK Size: 7'10 x 16' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 17' x 50' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 12' x 12'2 Tag: None Netform Lily Pad Net Size: 5' X 32' W L Body Length:24' Rope Color:Yellow Joint Color:Red 1250 HTPP Black Bonded 2in sq Border: RMFP025BK Size: 39 X 100' Tag: None 1250 HTPP Black Bonded 2in sq Border: RMFP025BK Size: 83 X 40' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 16'6 x 21'3 Tag: None 250 HTPP Black 1in sq Border: TW84NTBK Size: 9' x 25' Tag: 200' sec 1250 HTPP Yellow 2in sq Border: TW84NYYL Size: 6'1 x 12'7 Tag: 1855mm x 3840mm John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Help with split Was Need RE. New to Perl
Hi All, Many thanks to Jay for his examples I have now written a perl script that is munging a text file. Eventually I will move the perl code into a function inside a postgresql database. I am processing inputs like the following: 815 HTPP Black 2in sq Border: RMFP025BK Size: 7'10 x 16' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 17' x 50' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 12' x 12'2 Tag: None Netform Lily Pad Net Size: 5' X 32' W L Body Length:24' 250 HTPP Black 1in sq Border: TW84NTBK Size: 9' x 25' Tag: 200' sec 1250 HTPP Yellow 2in sq Border: None Size: 6'1 x 12'7 Tag: 1855mm x 3840mm Here is the code that I have written so far. #!/usr/bin/env perl use strict; use warnings; open(INFILE, input.txt) or die Can't open input.txt: $!; while (INFILE) { # assigns each line in turn to $_ my $v_border_id = ; my $v_size = ; my $v_length = ; my $v_width = ; my $v_tag = ; # Echo out the input line. print \nInput line:\n $_; # Perform a case insensitive check for the proper data format. #if (/(?i)border:.*size.*tag:.*/){ # Perform a case insensitive check for the proper data format. # Capture the desired parts of the data using parentheses. if (/(?i).*border:[ ]*(.*)[ ]*size:[ ]*(.*)[ ]*tag:[ ]*(.*)[ ]*/){ print properly formatted\n; # Check for no border. if ($1 =~ /(?i)none/){ $v_border_id = ; } else { $v_border_id = $1; } # Parse up the size string. my ($v_length, $v_width) = split(/x/, $2); print split(/(?i)[ ]*x[ ]*/, $2); print \n; # Check for no tag. #if ($v_tag =~ /(?i)tag:[ ]*none/){ if ($3 =~ /(?i)none/){ $v_tag = ; } else { $v_tag = $3; #$v_tag =~ s/.*(?i)tag:[ ]*//; } } else { print bad format\n; $v_border_id = ; $v_size = ; $v_tag = ; } print Border ID: $v_border_id\n; print Size string: $2\n; print Length string: $v_length\n; print Width string: $v_width\n; print Tag string: $v_tag\n\n; } close INFILE; Most of the code seems to be working as expected. I seem to be having a problem with the split command/assignment as the length and width strings are blank. The command is based on Jay's example shown here. my ($length, $width) = split / x /, $size ; What I really wanted to do was this. my ($v_length, $v_width) = split(/(?i)[ ]*x[ ]*/, $2); So I put the following in the code to try and understand what was going wrong. print split(/(?i)[ ]*x[ ]*/, $2); print \n; When I ran the program this is one of the outputs Input line: 1250 HTPP Yellow 2in sq Border: TW84NYYL Size: 4'11 x 6'1 Tag: 1500mm x 1855mm properly formatted 4'116'1 Border ID: TW84NYYL Size string: 4'11 x 6'1 Length string: Width string: Tag string: 1500mm x 1855mm What am I doing wrong? Kind Regards, Keith -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Help with split Was Need RE. New to Perl
On 4/19/05, Keith Worthington [EMAIL PROTECTED] wrote: Hi All, Many thanks to Jay for his examples I have now written a perl script that is munging a text file. Eventually I will move the perl code into a function inside a postgresql database. I am processing inputs like the following: 815 HTPP Black 2in sq Border: RMFP025BK Size: 7'10 x 16' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 17' x 50' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 12' x 12'2 Tag: None Netform Lily Pad Net Size: 5' X 32' W L Body Length:24' 250 HTPP Black 1in sq Border: TW84NTBK Size: 9' x 25' Tag: 200' sec 1250 HTPP Yellow 2in sq Border: None Size: 6'1 x 12'7 Tag: 1855mm x 3840mm Here is the code that I have written so far. #!/usr/bin/env perl use strict; use warnings; open(INFILE, input.txt) or die Can't open input.txt: $!; while (INFILE) { # assigns each line in turn to $_ my $v_border_id = ; my $v_size = ; my $v_length = ; my $v_width = ; my $v_tag = ; # Echo out the input line. print \nInput line:\n $_; # Perform a case insensitive check for the proper data format. #if (/(?i)border:.*size.*tag:.*/){ # Perform a case insensitive check for the proper data format. # Capture the desired parts of the data using parentheses. if (/(?i).*border:[ ]*(.*)[ ]*size:[ ]*(.*)[ ]*tag:[ ]*(.*)[ ]*/){ print properly formatted\n; # Check for no border. if ($1 =~ /(?i)none/){ $v_border_id = ; } else { $v_border_id = $1; } # Parse up the size string. my ($v_length, $v_width) = split(/x/, $2); print split(/(?i)[ ]*x[ ]*/, $2); print \n; # Check for no tag. #if ($v_tag =~ /(?i)tag:[ ]*none/){ if ($3 =~ /(?i)none/){ $v_tag = ; } else { $v_tag = $3; #$v_tag =~ s/.*(?i)tag:[ ]*//; } } else { print bad format\n; $v_border_id = ; $v_size = ; $v_tag = ; } print Border ID: $v_border_id\n; print Size string: $2\n; print Length string: $v_length\n; print Width string: $v_width\n; print Tag string: $v_tag\n\n; } close INFILE; Most of the code seems to be working as expected. I seem to be having a problem with the split command/assignment as the length and width strings are blank. The command is based on Jay's example shown here. my ($length, $width) = split / x /, $size ; What I really wanted to do was this. my ($v_length, $v_width) = split(/(?i)[ ]*x[ ]*/, $2); So I put the following in the code to try and understand what was going wrong. print split(/(?i)[ ]*x[ ]*/, $2); print \n; [snip] Well, it looks like the immediate issue here is that there is no $2. The match variables, including $1, $2, etc. are reset /every/ time you run a regex, whether you use them or not.. 'if ($1 =~ /(?i)none/){' undef'd $1, $2, and $3 so it could reuse them, and then didn't reload them. The match variables are /very/ temporary; if you're not going to use them immediately, assign them to a temporary variable. Also don't complicate your code unecessarily: if you're never going to turn off case sensitivity (i.e. with (-?i)), just use /none/i instead of /(?i)none/. Your eyes will thank you in the long run. HTH, --jay -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Help with split Was Need RE. New to Perl
On Tue, 19 Apr 2005 10:23:00 -0400, Jay Savage wrote On 4/19/05, Keith Worthington [EMAIL PROTECTED] wrote: Hi All, Many thanks to Jay for his examples I have now written a perl script that is munging a text file. Eventually I will move the perl code into a function inside a postgresql database. I am processing inputs like the following: 815 HTPP Black 2in sq Border: RMFP025BK Size: 7'10 x 16' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 17' x 50' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 12' x 12'2 Tag: None Netform Lily Pad Net Size: 5' X 32' W L Body Length:24' 250 HTPP Black 1in sq Border: TW84NTBK Size: 9' x 25' Tag: 200' sec 1250 HTPP Yellow 2in sq Border: None Size: 6'1 x 12'7 Tag: 1855mm x 3840mm Here is the code that I have written so far. #!/usr/bin/env perl use strict; use warnings; open(INFILE, input.txt) or die Can't open input.txt: $!; while (INFILE) { # assigns each line in turn to $_ my $v_border_id = ; my $v_size = ; my $v_length = ; my $v_width = ; my $v_tag = ; # Echo out the input line. print \nInput line:\n $_; # Perform a case insensitive check for the proper data format. #if (/(?i)border:.*size.*tag:.*/){ # Perform a case insensitive check for the proper data format. # Capture the desired parts of the data using parentheses. if (/(?i).*border:[ ]*(.*)[ ]*size:[ ]*(.*)[ ]*tag:[ ]*(.*)[ ]*/){ print properly formatted\n; # Check for no border. if ($1 =~ /(?i)none/){ $v_border_id = ; } else { $v_border_id = $1; } # Parse up the size string. my ($v_length, $v_width) = split(/x/, $2); print split(/(?i)[ ]*x[ ]*/, $2); print \n; # Check for no tag. #if ($v_tag =~ /(?i)tag:[ ]*none/){ if ($3 =~ /(?i)none/){ $v_tag = ; } else { $v_tag = $3; #$v_tag =~ s/.*(?i)tag:[ ]*//; } } else { print bad format\n; $v_border_id = ; $v_size = ; $v_tag = ; } print Border ID: $v_border_id\n; print Size string: $2\n; print Length string: $v_length\n; print Width string: $v_width\n; print Tag string: $v_tag\n\n; } close INFILE; Most of the code seems to be working as expected. I seem to be having a problem with the split command/assignment as the length and width strings are blank. The command is based on Jay's example shown here. my ($length, $width) = split / x /, $size ; What I really wanted to do was this. my ($v_length, $v_width) = split(/(?i)[ ]*x[ ]*/, $2); So I put the following in the code to try and understand what was going wrong. print split(/(?i)[ ]*x[ ]*/, $2); print \n; [snip] Well, it looks like the immediate issue here is that there is no $2. The match variables, including $1, $2, etc. are reset /every/ time you run a regex, whether you use them or not.. 'if ($1 =~ /(?i)none/){' undef'd $1, $2, and $3 so it could reuse them, and then didn't reload them. The match variables are /very/ temporary; if you're not going to use them immediately, assign them to a temporary variable. Also don't complicate your code unecessarily: if you're never going to turn off case sensitivity (i.e. with (-?i)), just use /none/i instead of /(?i)none/. Your eyes will thank you in the long run. HTH, --jay Okay that makes sense. But if that is what is happening then how come the print statement operating on $2 works just fine? I appreciate the comment on the i modifier. I didn't realize that case sensitivity could be turned off and back on within an expression. Not knowing what the bloody users are going to do I like to have it off all the time. Kind Regards, Keith -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Help with split Was Need RE. New to Perl
On Tue, 19 Apr 2005 13:19:31 -0400, Jay Savage wrote On 4/19/05, Keith Worthington [EMAIL PROTECTED] wrote: On Tue, 19 Apr 2005 10:23:00 -0400, Jay Savage wrote On 4/19/05, Keith Worthington [EMAIL PROTECTED] wrote: Hi All, Many thanks to Jay for his examples I have now written a perl script that is munging a text file. Eventually I will move the perl code into a function inside a postgresql database. I am processing inputs like the following: 815 HTPP Black 2in sq Border: RMFP025BK Size: 7'10 x 16' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 17' x 50' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 12' x 12'2 Tag: None Netform Lily Pad Net Size: 5' X 32' W L Body Length:24' 250 HTPP Black 1in sq Border: TW84NTBK Size: 9' x 25' Tag: 200' sec 1250 HTPP Yellow 2in sq Border: None Size: 6'1 x 12'7 Tag: 1855mm x 3840mm Here is the code that I have written so far. #!/usr/bin/env perl use strict; use warnings; open(INFILE, input.txt) or die Can't open input.txt: $!; while (INFILE) { # assigns each line in turn to $_ my $v_border_id = ; my $v_size = ; my $v_length = ; my $v_width = ; my $v_tag = ; # Echo out the input line. print \nInput line:\n $_; # Perform a case insensitive check for the proper data format. #if (/(?i)border:.*size.*tag:.*/){ # Perform a case insensitive check for the proper data format. # Capture the desired parts of the data using parentheses. if (/(?i).*border:[ ]*(.*)[ ]*size:[ ]*(.*)[ ]*tag:[ ]*(.*)[ ]*/){ print properly formatted\n; # Check for no border. if ($1 =~ /(?i)none/){ $v_border_id = ; } else { $v_border_id = $1; } # Parse up the size string. my ($v_length, $v_width) = split(/x/, $2); print split(/(?i)[ ]*x[ ]*/, $2); print \n; # Check for no tag. #if ($v_tag =~ /(?i)tag:[ ]*none/){ if ($3 =~ /(?i)none/){ $v_tag = ; } else { $v_tag = $3; #$v_tag =~ s/.*(?i)tag:[ ]*//; } } else { print bad format\n; $v_border_id = ; $v_size = ; $v_tag = ; } print Border ID: $v_border_id\n; print Size string: $2\n; print Length string: $v_length\n; print Width string: $v_width\n; print Tag string: $v_tag\n\n; } close INFILE; Most of the code seems to be working as expected. I seem to be having a problem with the split command/assignment as the length and width strings are blank. The command is based on Jay's example shown here. my ($length, $width) = split / x /, $size ; What I really wanted to do was this. my ($v_length, $v_width) = split(/(?i)[ ]*x[ ]*/, $2); So I put the following in the code to try and understand what was going wrong. print split(/(?i)[ ]*x[ ]*/, $2); print \n; [snip] Well, it looks like the immediate issue here is that there is no $2. The match variables, including $1, $2, etc. are reset /every/ time you run a regex, whether you use them or not.. 'if ($1 =~ /(?i)none/){' undef'd $1, $2, and $3 so it could reuse them, and then didn't reload them. The match variables are /very/ temporary; if you're not going to use them immediately, assign them to a temporary variable. Also don't complicate your code unecessarily: if you're never going to turn off case sensitivity (i.e. with (-?i)), just use /none/i instead of /(?i)none/. Your eyes will thank you in the long run. HTH, --jay Okay that makes sense. But if that is what is happening then how come the print statement operating on $2 works just fine? I appreciate the comment on the i modifier. I didn't realize that case sensitivity could be turned off and back on within an expression. Not knowing what the bloody users are going to do I like to have it off all the time. Kind Regards, Keith Sorry, not enough coffee. $1, $2, etc. actually stay set until they're unset, and the scoping is working in your favor here, although you'll notice all of the use of uninitialized value errors on your last set of splits. Using them at any distance from the regex that produced them, though i still likely to produce unexpected results. Also, your variables aren't scoped proberly either. You're declaring them with my inside an if block, and then trying to print them outside. my ($v_length, $v_width) = split(/(?i)[ ]*x[ ]*/, $2); defeats the purpose of predeclaring the variable. The second my rescopes both variables to the enclosing block. The effect here is roughly the same as 'local'.
Need RE. New to Perl
Hi All, I am new to the list and need some quick help. I have been kicking around with vi and sed for years but never took the time to learn Perl. Now I need to use Perl and could really use a jumpstart. I am writing a function in the Postgresql database using Perl because of its text processing power. My other options are less than pretty. :-( I will be processing inputs like the following: 815 HTPP Black 2in sq Border: RMFP025BK Size: 7'10 x 16' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 17' x 50' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 12' x 12'2 Tag: None Netform Lily Pad Net Size: 5' X 32' W L Body Length:24' Rope Color:Yellow Joint Color:Red 1250 HTPP Black Bonded 2in sq Border: RMFP025BK Size: 39 X 100' Tag: None 1250 HTPP Black Bonded 2in sq Border: RMFP025BK Size: 83 X 40' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 16'6 x 21'3 Tag: None 250 HTPP Black 1in sq Border: TW84NTBK Size: 9' x 25' Tag: 200' sec 1250 HTPP Yellow 2in sq Border: TW84NYYL Size: 6'1 x 12'7 Tag: 1855mm x 3840mm I need to parse them up into the pieces Border, Size and Tag. Furthermore I need to break up the Size piece into width and length components, feet and inches. Using the first example I would like to obtain: 'RMFP025BK' 7 10 16 0 '' (or NULL) Any help would be appreciated. Kind Regards, Keith -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Need RE. New to Perl
On Mon, 18 Apr 2005, Keith Worthington wrote: Any help would be appreciated. Write a program. Use the DBI module for the database programming. Get the DBD::Pg plugin to DBI for the PostgreSQL driver. Get this stuff from CPAN if it isn't on your system already. Break the problem down into simpler steps if you need to. From the *nix command line, read over `perldoc DBI` for the basics, or get a copy of a book like _Programming the Perl DBI_ for details. This list isn't a script writing service; while we are very happy to help new learners, you have to at least take a stab at reading over the documentation and writing your own code. Please show what you've tried so far and indicate what you're getting stuck on, and we can help you take it from there. -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Need RE. New to Perl
On 4/18/05, Keith Worthington [EMAIL PROTECTED] wrote: Hi All, I am new to the list and need some quick help. I have been kicking around with vi and sed for years but never took the time to learn Perl. Now I need to use Perl and could really use a jumpstart. I am writing a function in the Postgresql database using Perl because of its text processing power. My other options are less than pretty. :-( I will be processing inputs like the following: 815 HTPP Black 2in sq Border: RMFP025BK Size: 7'10 x 16' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 17' x 50' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 12' x 12'2 Tag: None Netform Lily Pad Net Size: 5' X 32' W L Body Length:24' Rope Color:Yellow Joint Color:Red 1250 HTPP Black Bonded 2in sq Border: RMFP025BK Size: 39 X 100' Tag: None 1250 HTPP Black Bonded 2in sq Border: RMFP025BK Size: 83 X 40' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 16'6 x 21'3 Tag: None 250 HTPP Black 1in sq Border: TW84NTBK Size: 9' x 25' Tag: 200' sec 1250 HTPP Yellow 2in sq Border: TW84NYYL Size: 6'1 x 12'7 Tag: 1855mm x 3840mm I need to parse them up into the pieces Border, Size and Tag. Furthermore I need to break up the Size piece into width and length components, feet and inches. Using the first example I would like to obtain: 'RMFP025BK' 7 10 16 0 '' (or NULL) Any help would be appreciated. Kind Regards, Keith Is this the data you expect to get out of the database...or data from somewhere else that you're going to insert into the database...or...? Becuase at the moment it doesn't really look like a database problem. We need some more here, including some sample code. What are you doing, and where is it going wrong? As far as quickstarts go, for database work, the two sources Chris mentioned are really the place to go. For a general perl intoductions, the first place to go is perldoc perlfaq, man perl, and perldoc perlintro, and the best printed resourse is by far _Learning Perl, 3rd Ed._ from O'Reilly. It's short and shout get you up and running in about a day, depending on your general programming ability. As for your specific question, you'll want to use some kind of regex. The following should give you some ideas and show a fairly perlish appraoch to variable declarations, but this is just an example. The perl motto is There's more than one way to do it. How you end up storing the data into variables will hopefully be deterined by what you ultimately want to do with it. #!/usr/bin/perl use strict; use warnings; my $data = 815 HTPP Black 2in sq Border: RMFP025BK Size: 7'10\ x 16' Tag: None ; $data =~ /.*Border: (.*) Size: (.*) Tag: (.*)$/; my ($border, $size, $tag) = ($1, $2, $3) ; my ($length, $width) = split / x /, $size ; my (%length, %width); ($length{feet}, $length{inches}) = split /(?:'|)/, $length ; ($width{feet}, $width{inches}) = split /(?:'|)/, $width ; print $border\n$length{feet}\n$length{inches}\n$width{feet}\n$width{inches}\n$tag\n; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Need RE. New to Perl
On Mon, 18 Apr 2005 15:30:39 -0400, Jay Savage wrote On 4/18/05, Keith Worthington [EMAIL PROTECTED] wrote: Hi All, I am new to the list and need some quick help. I have been kicking around with vi and sed for years but never took the time to learn Perl. Now I need to use Perl and could really use a jumpstart. I am writing a function in the Postgresql database using Perl because of its text processing power. My other options are less than pretty. :-( I will be processing inputs like the following: 815 HTPP Black 2in sq Border: RMFP025BK Size: 7'10 x 16' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 17' x 50' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 12' x 12'2 Tag: None Netform Lily Pad Net Size: 5' X 32' W L Body Length:24' Rope Color:Yellow Joint Color:Red 1250 HTPP Black Bonded 2in sq Border: RMFP025BK Size: 39 X 100' Tag: None 1250 HTPP Black Bonded 2in sq Border: RMFP025BK Size: 83 X 40' Tag: None 3000 HTPP Black 4in sq Border: WNY200BK Size: 16'6 x 21'3 Tag: None 250 HTPP Black 1in sq Border: TW84NTBK Size: 9' x 25' Tag: 200' sec 1250 HTPP Yellow 2in sq Border: TW84NYYL Size: 6'1 x 12'7 Tag: 1855mm x 3840mm I need to parse them up into the pieces Border, Size and Tag. Furthermore I need to break up the Size piece into width and length components, feet and inches. Using the first example I would like to obtain: 'RMFP025BK' 7 10 16 0 '' (or NULL) Any help would be appreciated. Kind Regards, Keith Is this the data you expect to get out of the database...or data from somewhere else that you're going to insert into the database...or...? Becuase at the moment it doesn't really look like a database problem. We need some more here, including some sample code. What are you doing, and where is it going wrong? As far as quickstarts go, for database work, the two sources Chris mentioned are really the place to go. For a general perl intoductions, the first place to go is perldoc perlfaq, man perl, and perldoc perlintro, and the best printed resourse is by far _Learning Perl, 3rd Ed._ from O'Reilly. It's short and shout get you up and running in about a day, depending on your general programming ability. As for your specific question, you'll want to use some kind of regex. The following should give you some ideas and show a fairly perlish appraoch to variable declarations, but this is just an example. The perl motto is There's more than one way to do it. How you end up storing the data into variables will hopefully be deterined by what you ultimately want to do with it. #!/usr/bin/perl use strict; use warnings; my $data = 815 HTPP Black 2in sq Border: RMFP025BK Size: 7'10\ x 16' Tag: None ; $data =~ /.*Border: (.*) Size: (.*) Tag: (.*)$/; my ($border, $size, $tag) = ($1, $2, $3) ; my ($length, $width) = split / x /, $size ; my (%length, %width); ($length{feet}, $length{inches}) = split /(?:'|)/, $length ; ($width{feet}, $width{inches}) = split /(?:'|)/, $width ; print $border\n$length{feet}\n$length{inches}\n$width{feet}\n$width{inches}\n$tag\n; Jay, Thanks very much for your post. I have been banging my head against the wall and based on what I have been able to read in the last hour or so I have come up with the following code. #!/usr/bin/env perl use strict; use warnings; open(INFILE, input.txt) or die Can't open input.txt: $!; while (INFILE) { # assigns each line in turn to $_ my $v_border_id = $_; my $v_size = $_; my $v_tag = $_; # Echo out the input line. print Just read in this line: $_; # Print out the border. if (/(?i)border:.*size.*tag:.*/){ print properly formatted\n; $v_border_id =~ s/.*(?i)border:[ ]*//; $v_border_id =~ s/[]*(?i)size:.*//; print Border ID: $v_border_id; $v_size =~ s/.*(?i)size:[ ]*//; $v_size =~ s/[ ]*(?i)tag:.*//; print Size string: $v_size; $v_tag =~ s/.*(?i)tag:[]*//; At the moment I am just processing a text file to get the hang of how to munge data with perl. Eventually I will be creating a function inside a postgresql database. It sort of works like this: CREATE OR REPLACE FUNCTION interface.func_parse_description(varchar) RETURNS varchar AS $BODY$ perl statements $BODY$ LANGUAGE 'plperl' STABLE STRICT; If your curious this page will give you more details about what I am trying to do. http://www.postgresql.org/docs/8.0/interactive/plperl.html I can see from your post that there are lots better ways to accomplish what I need. Although at the moment the example you sent is largely beyond me I will try to implement some of your suggestions and see what happens. Kind Regards, Keith -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
New to perl ...
Hello, I would like to swap the file name only and not the extension or the content. Example: There are two file : 1.jpg and 3.jpg output = 1.jpg becomes 3.jpg and 3.jpg becomes 1.jpg OR 1.jpg and 3.gif output = 1.jpg becomes 3.jpg and 3.gif becomes 1.gif here we are changing the name only and not the extension. Inside my program I don't know either files extension, but they will be only jpg or gif Any help...
Re: New to perl ...
What have you tried? Please post the code so we can help Bajaria, Praful wrote: Hello, I would like to swap the file name only and not the extension or the content. Example: There are two file : 1.jpg and 3.jpg output = 1.jpg becomes 3.jpg and 3.jpg becomes 1.jpg OR 1.jpg and 3.gif output = 1.jpg becomes 3.jpg and 3.gif becomes 1.gif here we are changing the name only and not the extension. Inside my program I don't know either files extension, but they will be only jpg or gif Any help... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New to perl ...
What you are seeking to do is essentially this: move the first file to a temp file: mv file1.ext /tmp/file1.ext move the second file to the first file: mv file2.ext file1.ext move the temp file to the second file: mv /tmp/file1.ext file2.ext You can do this with a system call for each of the moves. Extensions and names won't matter, as you will be giving them the name and extension when you do the moves. I'd help with the code snippets, but I am in PHP mode and my perl is weak at best... Robert On Tue, 13 Apr 2004 11:53:17 -0700 Bajaria, Praful [EMAIL PROTECTED] wrote. Hello, I would like to swap the file name only and not the extension or the content. Example: There are two file : 1.jpg and 3.jpg output = 1.jpg becomes 3.jpg and 3.jpg becomes 1.jpg OR 1.jpg and 3.gif output = 1.jpg becomes 3.jpg and 3.gif becomes 1.gif here we are changing the name only and not the extension. Inside my program I don't know either files extension, but they will be only jpg or gif Any help... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: New to perl ...
My code is kind of not efficient. Here is the code. where index is 1.jpg or 1.gif. The program only knows 1 if ($image_found == 1) { if ( -e $index.jpg ) { $old = 1; system(/bin/mv -f $working_dir/$index.jpg $working_dir/$index_$index.jpg); $new_file = $index_$index. .jpg; $new_file1 = $index. .jpg; } if ( -e $index.gif ) { $old = 1; system(/bin/mv -f $working_dir/$index.gif $working_dir/$index_$index.gif); $new_file = $index_$index. .gif; $new_file1 = $index. .jpg; } ## which var will content 3.jpg or 3.gif. The program only knows 3 if ( -e $which.jpg ) { $new = 1; system(/bin/mv -f $working_dir/$which.jpg $working_dir/$which_which.jpg); $old_file = $which_which. .jpg; $old_file1 = $which..gif; } if ( -e $which.gif ) { $new = 1; system(/bin/mv -f $working_dir/$which.gif $working_dir/$which_$which.gif); $old_file = $which_$which..gif; $old_file1 = $which..gif; } if ( $old == 1 ) { system(/bin/mv -f $working_dir/$new_file1 $working_dir/$old_file1); } if ( $new == 1 ) { system(/bin/mv -f $working_dir/$new_file $working_dir/$new_file1); } } -Original Message- From: u235sentinel [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 13, 2004 12:02 PM Cc: [EMAIL PROTECTED] Subject: Re: New to perl ... What have you tried? Please post the code so we can help Bajaria, Praful wrote: Hello, I would like to swap the file name only and not the extension or the content. Example: There are two file : 1.jpg and 3.jpg output = 1.jpg becomes 3.jpg and 3.jpg becomes 1.jpg OR 1.jpg and 3.gif output = 1.jpg becomes 3.jpg and 3.gif becomes 1.gif here we are changing the name only and not the extension. Inside my program I don't know either files extension, but they will be only jpg or gif Any help... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: New to perl ...
Hello, I am not sure, why you want to 'do Nothing' about the contents of the file. if you change gif to jpg, it will conflict the formats. Try this for just changing names: $a='1.x.jpg'; # first file.. $b='3.gif'; # second file.. if ( $a:$b =~ /(.*)\.([^\.]+):(.*)\.([^\.]+)/) { $a=$3.$2; $b=$1.$4; } print a = $a ;; b= $b \n; thanks, Jay -Original Message- From: Bajaria, Praful [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 13, 2004 2:53 PM To: [EMAIL PROTECTED] Subject: New to perl ... Hello, I would like to swap the file name only and not the extension or the content. Example: There are two file : 1.jpg and 3.jpg output = 1.jpg becomes 3.jpg and 3.jpg becomes 1.jpg OR 1.jpg and 3.gif output = 1.jpg becomes 3.jpg and 3.gif becomes 1.gif here we are changing the name only and not the extension. Inside my program I don't know either files extension, but they will be only jpg or gif Any help... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New to perl ...
Hello, I would like to swap the file name only and not the extension or the content. Example: There are two file : 1.jpg and 3.jpg output = 1.jpg becomes 3.jpg and 3.jpg becomes 1.jpg OR 1.jpg and 3.gif output = 1.jpg becomes 3.jpg and 3.gif becomes 1.gif here we are changing the name only and not the extension. Inside my program I don't know either files extension, but they will be only jpg or gif Any help... Scrap the shelling out to 'mv' use Perl's builtin 'rename' instead... perldoc -f rename http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New to Perl
david wrote: how does simply putting a piece of logic in your code and print out an error meesage when a variable match a certain value prove something in Perl is either true nor false? this is simply impossible in Perl because you can never code a 3-way logic. use strict; use warnings; my $test = 0; ($test) ? print \$test exists : ($test 0) ? print \$test greater then zero : ($test 0) ? print \$test less then zero : print \$test is zero; undef $test; (undef, $test) ? print \$test is defined : print \$test is undefined; __END__ But I was asked not to confuse... So ignore this posting... -Sx- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New to Perl
Wc -Sx- Jones wrote: david wrote: how does simply putting a piece of logic in your code and print out an error meesage when a variable match a certain value prove something in Perl is either true nor false? this is simply impossible in Perl because you can never code a 3-way logic. use strict; use warnings; my $test = 0; ($test) ? print \$test exists : ($test 0) ? print \$test greater then zero : ($test 0) ? print \$test less then zero : print \$test is zero; undef $test; (undef, $test) ? print \$test is defined : print \$test is undefined; __END__ But I was asked not to confuse... So ignore this posting... no i am not going to ignore it :-) tell me what exactly have you accomplished and what questions have you answered? my statement is: you can never code a 3-way logic in Perl and then you post a bunch of code without any comment at all except telling people to ignore your code. thus, i assume your code answer my question and prove that you can code a 3-way logic in Perl which means: * Perl's 'COND ? THEN : ELSE' conditional operator should never be used because it only handles a 2-way logic: true or false * Perl's equality and inequality operators such as ==,!=,eq,ne should never be used because it only handles a 2-way logic: it evaluates their operants and produce either a true or false value * You should never uses 'if(COND)' in Perl because it only evaluates COND to either true or false and NOT a 3-way logic as true,false or neither true nor false * You should never uses 'unless(COND)' in Perl for the same reason that it only handles a 2-way logic and evaluates to either true or false and nothing else * You should never uses 'EXP or EXP','EXP and EXP','EXP EXP','EXP || EXP' in Perl because they only evaluates to true or false * More importantly, given this simple program: #!/usr/bin/perl -w use strict; my $i = $ENV{something} ? 1 : 2; __END__ * I say $i is either 1 or 2 because $ENV{something} can only be true or false * You *might* be saying $i is unknown (or undef) because $ENV{something} can be true, or false or neither true nor false which '?:' can't handle. correct? * finally, how useful is this: ($test) ? print \$test exists : ($test 0) ? print \$test greater then zero : ($test 0) ? print \$test less then zero : print \$test is zero; if $test is neither true nor false? * do you realize $test is evaluated to either true or false? * do you realize $test 0 is evaluated to either true or false? * do you realize $test 0 is evaulated to either true or false? david -- s$s*$+/tgmecJntgRtgjvqpCvuwL$;$;=qq$ \x24\x5f\x3d\x72\x65\x76\x65\x72\x73\x65 \x24\x5f\x3b\x73\x2f\x2e\x2f\x63\x68\x72 \x28\x6f\x72\x64\x28\x24\x26\x29\x2d\x32 \x29\x2f\x67\x65\x3b\x70\x72\x69\x6e\x74 \x22\x24\x5f\x5c\x6e\x22\x3b\x3b$;eval$; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New to Perl
david wrote: * You *might* be saying $i is unknown (or undef) because $ENV{something} can be true, or false or neither true nor false which '?:' can't handle. correct? Undef is a valid condition in Perl Yes or No? -Sx- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New to Perl
david wrote: * You *might* be saying $i is unknown (or undef) because $ENV{something} can be true, or false or neither true nor false which '?:' can't handle. correct? Undef is a valid condition in Perl Yes or No? -Sx- No. Can undef ever be true? If not, it necessarily is false, which means it is not an independent condition. The closest you could get would be 0 but true but then you are still only close (and not close enough)... http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New to Perl
Wc -Sx- Jones wrote: david wrote: * You *might* be saying $i is unknown (or undef) because $ENV{something} can be true, or false or neither true nor false which '?:' can't handle. correct? Undef is a valid condition in Perl Yes or No? yes but is undef true or false? and when you evaluate undef as a boolean expression, what possible values can it has? i say: * 2 possible values: true or false your previous posts sound like: * 3 possible values (3-way logic): true or false or neither true nor false and my very original quesiont is: show me an expression where it can be evaluated to neither true nor false david -- s$s*$+/tgmecJntgRtgjvqpCvuwL$;$;=qq$ \x24\x5f\x3d\x72\x65\x76\x65\x72\x73\x65 \x24\x5f\x3b\x73\x2f\x2e\x2f\x63\x68\x72 \x28\x6f\x72\x64\x28\x24\x26\x29\x2d\x32 \x29\x2f\x67\x65\x3b\x70\x72\x69\x6e\x74 \x22\x24\x5f\x5c\x6e\x22\x3b\x3b$;eval$; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New to Perl
Wiggins d Anconia wrote: [ed.]-Sx- wrote: Undef is a valid condition in Perl Yes or No? No. Can undef ever be true? If not, it necessarily is false, which means it is not an independent condition. The closest you could get would be 0 but true but then you are still only close (and not close enough)... Agreed. The point of my $test = 0 was that in THAT test ZERO (0) was true... IE - 'what' I wanted to test for... my $test = 0; ($test) ? print \$test exists : ($test 0) ? print \$test greater then zero : ($test 0) ? print \$test less then zero : print \$test is zero; I need the other sections to deal with it if it is higher or lower... Not everything MUST fit into 0 is false 1 is true. Personally I am abandoning this thread - I ran out of Ol' Grand Dad... -Sx- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New to Perl
david wrote: your previous posts sound like: * 3 possible values (3-way logic): true or false or neither true nor false And that is why I said you guys are good fish. (And then then the Perl police arrived ... :) Just kidding... and my very original quesiont is: show me an expression where it can be evaluated to neither true nor false UNDEF will be 'treated' as FALSE; Larry had to have some sanity somewhere... ( But, UNDEF is not TRUE OR FALSE - it is undefined. ) Just because it can't be coded for at this time doesn't change that. :) -Sx- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New to Perl
Wc -Sx- Jones wrote: you said: UNDEF will be 'treated' as FALSE; Larry had to have some sanity somewhere... clearly stating that undef is false but later you said: ( But, UNDEF is not TRUE OR FALSE - it is undefined. ) clearly stating that undef is neither true nor false. which way is it? i got some off line messages telling me to just ignore this thread so this will be my last post to this thread and i want to make it clear: * undef in Perl is false: [panda]# perl -le 'print +(undef) ? true : false' false [panda]# * any valid Perl expression can only be evaluated to 2 possible values when used as a boolean expression: true or false. david -- s$s*$+/tgmecJntgRtgjvqpCvuwL$;$;=qq$ \x24\x5f\x3d\x72\x65\x76\x65\x72\x73\x65 \x24\x5f\x3b\x73\x2f\x2e\x2f\x63\x68\x72 \x28\x6f\x72\x64\x28\x24\x26\x29\x2d\x32 \x29\x2f\x67\x65\x3b\x70\x72\x69\x6e\x74 \x22\x24\x5f\x5c\x6e\x22\x3b\x3b$;eval$; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: New to Perl
-Original Message- From: david [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 06, 2004 3:55 PM To: [EMAIL PROTECTED] Subject: Re: New to Perl Wc -Sx- Jones wrote: you said: UNDEF will be 'treated' as FALSE; Larry had to have some sanity somewhere... clearly stating that undef is false but later you said: ( But, UNDEF is not TRUE OR FALSE - it is undefined. ) clearly stating that undef is neither true nor false. which way is it? i got some off line messages telling me to just ignore this thread so this will be my last post to this thread and i want to make it clear: * undef in Perl is false: [panda]# perl -le 'print +(undef) ? true : false' false [panda]# * any valid Perl expression can only be evaluated to 2 possible values when used as a boolean expression: true or false. david -- s$s*$+/tgmecJntgRtgjvqpCvuwL$;$;=qq$ \x24\x5f\x3d\x72\x65\x76\x65\x72\x73\x65 \x24\x5f\x3b\x73\x2f\x2e\x2f\x63\x68\x72 \x28\x6f\x72\x64\x28\x24\x26\x29\x2d\x32 \x29\x2f\x67\x65\x3b\x70\x72\x69\x6e\x74 \x22\x24\x5f\x5c\x6e\x22\x3b\x3b$;eval$; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response David, undef is false in perl. Jones did not mean what you pressumed. but not all false are undefs. So undef is sub set of false, that can be tested using defined( ) etc. Jones meant that, an undef would return false in a logical context. For example : 23 - 23 is not false. It evaluates to false in a logical context. Anyway, my humble opinion is , this thread is too much on too small problem. thanks, Jay -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New to Perl
Jayakumar Rajagopal wrote: undef is false in perl. Jones did not mean what you pressumed. but not all false are undefs. So undef is sub set of false, that can be tested using defined( ) etc. Jones meant that, an undef would return false in a logical context. For example : 23 - 23 is not false. It evaluates to false in a logical context. I agree - Thank you, an excellent example. Anyway, my humble opinion is , this thread is too much on too small problem. This thread should be zero'ed. Bill -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: New to Perl
Charles K. Clarkson wrote: david [EMAIL PROTECTED] wrote: : : this is impossible in Perl. show me an example : where something is neither true nor false. Er, um, well ... #!/usr/bin/perl package foo; use strict; use warnings; use Carp 'croak'; use overload bool = \boolean; [snip] sub boolean { my $self = shift; return $self-{value} if $self-{bool}; croak Sorry this value does not evaluate as either true or as false; } [snip] $foo-value( 'ambiguous' ); print true\n if $foo; __END__ you simply overload bool and croak out when you set it with ambiguous. what does that prove? how is it related to creating an expression where it's niether true nor false? if your example counts, why not simply: #!/usr/bin/perl -w use strict; my $i = undef; if($i){ exit; }else{ die sorry \$i does not evaluate as either true or as false\n; } __END__ how does simply putting a piece of logic in your code and print out an error meesage when a variable match a certain value prove something in Perl is either true nor false? this is simply impossible in Perl because you can never code a 3-way logic. david -- s$s*$+/tgmecJntgRtgjvqpCvuwL$;$;=qq$ \x24\x5f\x3d\x72\x65\x76\x65\x72\x73\x65 \x24\x5f\x3b\x73\x2f\x2e\x2f\x63\x68\x72 \x28\x6f\x72\x64\x28\x24\x26\x29\x2d\x32 \x29\x2f\x67\x65\x3b\x70\x72\x69\x6e\x74 \x22\x24\x5f\x5c\x6e\x22\x3b\x3b$;eval$; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: New to Perl
david [EMAIL PROTECTED] wrote: : : Charles K. Clarkson wrote: : : david [EMAIL PROTECTED] wrote: : : : : this is impossible in Perl. show me an example : : where something is neither true nor false. : : Er, um, well ... : [snipped code] : : you simply overload bool and croak out when you set : it with ambiguous. what does that prove? Absolutely nothing. The script was an humorous attempt to show that absolutes should be given out very rarely (and that few things are impossible with perl). Obviously it was a failed humorous attempt. Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New to Perl
John W. Krahn wrote: 1 or greater -1 or less A pox on both your houses: ;-o) Greetings! E:\d_drive\perlStuffperl -w my $test = .1; print (($test ? $test : 'false'), \n); ^Z 1e-005 Greetings! E:\d_drive\perlStuffperl -w my $test = -.1; print (($test ? $test : 'false'), \n); ^Z -1e-005 How about just non-zero? Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New to Perl
R. Joseph Newton wrote: How about just non-zero? (non-zero) ? print Boo... : ''; __END__ :) -Sx- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New to Perl
Oliver Schnarchendorf wrote: On Fri, 2 Apr 2004 12:19:32 -0800 , Bajaria, Praful wrote: However, when I print print content $request-content \n; I get content HTTP::Request=HASH(0x8546b3c)-content and print $response-message \n; give me message HTTP::Response=HASH(0x8546b60)-message Am I doing something wrong here ? Yes... but unknowingly. You are trying to print what a hash function returns ($hash-function). The problem is that perl doesn't see it this way. It will just print the data type of the hash variable (HASH(0x000)) and see everything following the hash variable (-function) as normal text. That too, perhaps. In more general terms, function calls are not interpolated within strings. There are a few ways around this. The easiest two for you are (a) Store the value returned by the hash-function in another variable before you use it: my $content = $request-content; print content: $content\n; (b) Use the perl way of concatenating strings with '.''s: print content: .$request-content.\n; Option (b) above is generally my approach for function calls. So far its been very dependable. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
New to Perl
I have the following code to check the website status. my $ua = LWP::UserAgent-new; $url = http://www.cnn.com;; $response = $ua-get($url); if ($response-is_success) { print web site is working\n; } else { print web site is not working\n; } quesion: 1) if the site is not woring, I would like to know why ?. How can I retrieve the error code? 2) what is the fail value ? i.e. $response-not_working.. etc. Thanks
Re: New to Perl
On Fri, 2 Apr 2004 10:53:46 -0800 , Bajaria, Praful wrote: my $ua = LWP::UserAgent-new; $url = http://www.cnn.com;; $response = $ua-get($url); if ($response-is_success) { print web site is working\n; } else { print web site is not working\n; } quesion: 1) if the site is not woring, I would like to know why ?. How can I retrieve the error code? 2) what is the fail value ? i.e. $response-not_working.. etc. Hello Bajaria, if the web site request ($ua-get()) fails $response-is_success will be false. By false I mean it isn't set to 1 which equals true. In your above example you would end up in the 'else'-block. To find out which error occured you need to take a look at $response-code. The number found in $response-code is in the range from 100 to 599. You can find more about these return codes by visiting http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html. To get a short human readable message about the meaning of $response-code take a look at $response-message. You can find out much more by entering the following line at the command prompt (or the terminal): perldoc LWP::UserAgent perldoc HTTP::Response thanks /oliver/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: New to Perl
Thanks for the info. However, when I print print content $request-content \n; I get content HTTP::Request=HASH(0x8546b3c)-content and print $response-message \n; give me message HTTP::Response=HASH(0x8546b60)-message Am I doing something wrong here ? Thanks Praful -Original Message- From: Oliver Schnarchendorf [mailto:[EMAIL PROTECTED] Sent: Friday, April 02, 2004 11:03 AM To: Bajaria, Praful Cc: '[EMAIL PROTECTED]' Subject: Re: New to Perl On Fri, 2 Apr 2004 10:53:46 -0800 , Bajaria, Praful wrote: my $ua = LWP::UserAgent-new; $url = http://www.cnn.com;; $response = $ua-get($url); if ($response-is_success) { print web site is working\n; } else { print web site is not working\n; } quesion: 1) if the site is not woring, I would like to know why ?. How can I retrieve the error code? 2) what is the fail value ? i.e. $response-not_working.. etc. Hello Bajaria, if the web site request ($ua-get()) fails $response-is_success will be false. By false I mean it isn't set to 1 which equals true. In your above example you would end up in the 'else'-block. To find out which error occured you need to take a look at $response-code. The number found in $response-code is in the range from 100 to 599. You can find more about these return codes by visiting http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html. To get a short human readable message about the meaning of $response-code take a look at $response-message. You can find out much more by entering the following line at the command prompt (or the terminal): perldoc LWP::UserAgent perldoc HTTP::Response thanks /oliver/
Re: New to Perl
Oliver Schnarchendorf wrote: By false I mean it isn't set to 1 which equals true. These are false (or undefined) - 0 0 NULL Just about everything else is true: 1 or greater 00 any string -Sx- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: New to Perl
On Fri, 2 Apr 2004 12:19:32 -0800 , Bajaria, Praful wrote: However, when I print print content $request-content \n; I get content HTTP::Request=HASH(0x8546b3c)-content and print $response-message \n; give me message HTTP::Response=HASH(0x8546b60)-message Am I doing something wrong here ? Yes... but unknowingly. You are trying to print what a hash function returns ($hash-function). The problem is that perl doesn't see it this way. It will just print the data type of the hash variable (HASH(0x000)) and see everything following the hash variable (-function) as normal text. There are a few ways around this. The easiest two for you are (a) Store the value returned by the hash-function in another variable before you use it: my $content = $request-content; print content: $content\n; (b) Use the perl way of concatenating strings with '.''s: print content: .$request-content.\n; thanks /oliver/ BTW. You might want to look into buying a book on learning perl. There good ones out there are: Learning Perl, Randel Schwartz Beginning Perl, Simon Cozens -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New to Perl
Wc -Sx- Jones wrote: Oliver Schnarchendorf wrote: By false I mean it isn't set to 1 which equals true. These are false (or undefined) - 0 0 NULL what do you mean by NULL? david -- s$s*$+/tgmecJntgRtgjvqpCvuwL$;$;=qq$ \x24\x5f\x3d\x72\x65\x76\x65\x72\x73\x65 \x24\x5f\x3b\x73\x2f\x2e\x2f\x63\x68\x72 \x28\x6f\x72\x64\x28\x24\x26\x29\x2d\x32 \x29\x2f\x67\x65\x3b\x70\x72\x69\x6e\x74 \x22\x24\x5f\x5c\x6e\x22\x3b\x3b$;eval$; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: New to Perl
Oliver, :) the below code works my $content = $request-content; print content: $content\n; but this doesn't work print content: .$request-content.\n; Anyways, why do u have to assign to a var and print ? -Original Message- From: Oliver Schnarchendorf [mailto:[EMAIL PROTECTED] Sent: Friday, April 02, 2004 1:46 PM To: Bajaria, Praful Cc: '[EMAIL PROTECTED]' Subject: RE: New to Perl On Fri, 2 Apr 2004 12:19:32 -0800 , Bajaria, Praful wrote: However, when I print print content $request-content \n; I get content HTTP::Request=HASH(0x8546b3c)-content and print $response-message \n; give me message HTTP::Response=HASH(0x8546b60)-message Am I doing something wrong here ? Yes... but unknowingly. You are trying to print what a hash function returns ($hash-function). The problem is that perl doesn't see it this way. It will just print the data type of the hash variable (HASH(0x000)) and see everything following the hash variable (-function) as normal text. There are a few ways around this. The easiest two for you are (a) Store the value returned by the hash-function in another variable before you use it: my $content = $request-content; print content: $content\n; (b) Use the perl way of concatenating strings with '.''s: print content: .$request-content.\n; thanks /oliver/ BTW. You might want to look into buying a book on learning perl. There good ones out there are: Learning Perl, Randel Schwartz Beginning Perl, Simon Cozens
Re: New to Perl
david wrote: NULL what do you mean by NULL? david explicit zero (0) or nothing ( or undefined.) That is NOT true (it's not false either per se...) -Sx- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New to Perl
Wc -Sx- Jones wrote: david wrote: NULL what do you mean by NULL? david explicit zero (0) or nothing ( or undefined.) That is NOT true (it's not false either per se...) you sound more confuse than your previous reply :-) maybe my question isn't so clear. you said: These are false (or undefined) - 0 0 NULL so let's see: [panda]# perl -e '0 or die correct' correct at -e line 1. [panda]# perl -e '0 or die correct' correct at -e line 1. [panda]# perl -e ' or die correct' correct at -e line 1. so far so good. now for NULL: [panda]# perl -e 'NULL or die correct' [panda]# die never executed so is NULL true or false? perhaps you mean undef when you mentioned NULL: [panda]# perl -e 'undef or die correct' correct at -e line 1. you also mentioned: explicit zero (0) or nothing ( or undefined.) That is NOT true (it's not false either per se...) this is impossible in Perl. show me an example where something is neither true nor false. david -- s$s*$+/tgmecJntgRtgjvqpCvuwL$;$;=qq$ \x24\x5f\x3d\x72\x65\x76\x65\x72\x73\x65 \x24\x5f\x3b\x73\x2f\x2e\x2f\x63\x68\x72 \x28\x6f\x72\x64\x28\x24\x26\x29\x2d\x32 \x29\x2f\x67\x65\x3b\x70\x72\x69\x6e\x74 \x22\x24\x5f\x5c\x6e\x22\x3b\x3b$;eval$; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: New to Perl
On Fri, 2 Apr 2004 14:17:21 -0800 , Bajaria, Praful wrote: :) the below code works my $content = $request-content; print content: $content\n; but this doesn't work print content: .$request-content.\n; Anyways, why do u have to assign to a var and print ? Okay... the use of the $request hash variable was just an example. Yours should be $response-content, following your earlier example: See the following example: ---example start--- #!/usr/local/bin/perl use warnings; use strict; use LWP::UserAgent; my $ua = LWP::UserAgent-new; my $response = $ua-get( 'http://www.cnn.com/' ); if ( $response-is_success ) { print Content:\n.$response-content.\n; } else { print Error:\n.$response-message.\n; } ---example end--- You have to use the dot-concatenation or save the result of $module-function into a variable because it, in your case $response-content, isn't a variable. It is a function that returns a variable. Because of that perl just prints the memory address of the modules data structure in your memory if you try to let perl do the string substitution for you. /oliver/ BTW.: You might also just try to enter perldoc perl at your terminal prompt. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New to Perl
david wrote: this is impossible in Perl. show me an example where something is neither true nor false. you guys are good fish =) 2ff; -Sx- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New to Perl
Wc -Sx- Jones wrote: Oliver Schnarchendorf wrote: By false I mean it isn't set to 1 which equals true. These are false (or undefined) - 0 0 NULL Perl doesn't have a NULL symbol, you probably meant undef. Just about everything else is true: 1 or greater -1 or less 00 any string Note that a string in numerical context evaluates to 0 which is false. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: New to Perl
david [EMAIL PROTECTED] wrote: : : Wc -Sx- Jones wrote: : : explicit zero (0) or nothing ( or undefined.) : : That is NOT true (it's not false either per se...) : : : this is impossible in Perl. show me an example : where something is neither true nor false. Er, um, well ... #!/usr/bin/perl package foo; use strict; use warnings; use Carp 'croak'; use overload bool = \boolean; sub new { return bless { value = undef, bool = 1 }, 'foo'; } sub value { my $self = shift; $self-{value} = shift if @_; return $self-{value} unless defined $self-{value}; $self-{bool} = $self-{value} eq 'ambiguous' ? undef : $self-{value}; return $self-{value}; } sub boolean { my $self = shift; return $self-{value} if $self-{bool}; croak Sorry this value does not evaluate as either true or as false; } package main; $|++; use strict; use warnings; #use Data::Dumper 'Dumper'; my $foo = foo-new(); $foo-value(1); print true\n if $foo; $foo-value( undef ); print false\n unless $foo; $foo-value( 'ambiguous' ); print true\n if $foo; __END__ HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
New to PERL and Need Help
I am new to the world of PERL and need help to get started. I have the book: PERL for Oracle DBA's. But this has not helped me get started. My background is Oracle as a DBA. I have a good background with SQL*Plus and PL/SQL. On my home PC I have XP Prof. and Oracle 9.2. My Oracle supports PERL but I cannot get it to work. It is not the latest release of PERL, but that is not a problem. When I can get it to work I can update at that time. Any help with books for beginners or web sites will be greatly appreciated. Keep it very simple. Thanks much, Ken Janusz, CPIM
RE: New to PERL and Need Help
Start with http://safari.oreilly.com Read learning perl. Quick and easy read. Perl dbi And programming perl. Read all of the perldoc FAQ's. Paul Kraus --- PEL Supply Company Network Administrator -Original Message- From: KENNETH JANUSZ [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 13, 2004 8:57 AM To: PERL Beginners Subject: New to PERL and Need Help I am new to the world of PERL and need help to get started. I have the book: PERL for Oracle DBA's. But this has not helped me get started. My background is Oracle as a DBA. I have a good background with SQL*Plus and PL/SQL. On my home PC I have XP Prof. and Oracle 9.2. My Oracle supports PERL but I cannot get it to work. It is not the latest release of PERL, but that is not a problem. When I can get it to work I can update at that time. Any help with books for beginners or web sites will be greatly appreciated. Keep it very simple. Thanks much, Ken Janusz, CPIM -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: New to PERL and Need Help
A good starting place is : http://learn.perl.org/ HTH, José. -Original Message- From: KENNETH JANUSZ [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 13, 2004 2:57 PM To: PERL Beginners Subject: New to PERL and Need Help I am new to the world of PERL and need help to get started. I have the book: PERL for Oracle DBA's. But this has not helped me get started. My background is Oracle as a DBA. I have a good background with SQL*Plus and PL/SQL. On my home PC I have XP Prof. and Oracle 9.2. My Oracle supports PERL but I cannot get it to work. It is not the latest release of PERL, but that is not a problem. When I can get it to work I can update at that time. Any help with books for beginners or web sites will be greatly appreciated. Keep it very simple. Thanks much, Ken Janusz, CPIM DISCLAIMER This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
RE: New to PERL and Need Help
KENNETH JANUSZ [EMAIL PROTECTED] asked: Sent: Tuesday, January 13, 2004 2:57 PM I am new to the world of PERL and need help to get started. [...] Any help with books for beginners or web sites will be greatly appreciated. Keep it very simple. Go grab ActiveState's Perl port for windows at http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl if you haven't done so already. You'll want the MSI package. Once you've got it on your HD, open the installation directory in the Explorer, find the HTML folder and double click on index.html. Bookmark this page; it's your complete Perl documentation. Search in the right pane for perlfaq2 and click it. There's a list of recommended books on that page. HTH, Thomas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: New to PERL and Need Help
Once you get the AS PERL working, use ppm or ppm3 (Perl Package Manager) to get DBI/DBD modules (DBD::Oracle) on your system. Connect and you're on your way. There is a book on this subject that will help, I've always found this link to help describe the length of the tunnel... http://www.yapc.org/America/previous-years/19100/schedule/author/njt_mastery.html At 07:57 AM 1/13/04 -0600, you wrote: I am new to the world of PERL and need help to get started. I have the book: PERL for Oracle DBA's. But this has not helped me get started. My background is Oracle as a DBA. I have a good background with SQL*Plus and PL/SQL. On my home PC I have XP Prof. and Oracle 9.2. My Oracle supports PERL but I cannot get it to work. It is not the latest release of PERL, but that is not a problem. When I can get it to work I can update at that time. Any help with books for beginners or web sites will be greatly appreciated. Keep it very simple. Thanks much, Ken Janusz, CPIM -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
new to perl
Hi, This is my first email to beginner's Perl and sincerely hope I am sending this message to the right place. I want to delete some DB backup files using UNC pathing and perl. My code segment, which does not work, is listed below. I do not get any errors when I run this piece of code however, the files are not deleted either. Does anyone know what is wrong with the code? The file permissions are open to the world, the file was not in use, and I did try using (myserver\\e$\\LS_DbBackUp\\stdby30dev\\*.trn file:///\\myserver\e$\LS_DbBackUp\stdby30dev\*.trn ). What I found out so far is that my code works with Perl version 5.005_03, binary build 522 but not with ActivePerl-5.6.1-535-MSWin32-x86.msi or ActivePerl-5.8.0.806-MSWin32-x86.msi. Has anyone else come across this issue? What did you do to resolve it? Code segment foreach $file (myserver\\e\\LS_DbBackUp\\stdby30dev\\*.trn file:///\\myserver\e\LS_DbBackUp\stdby30dev\*.trn ) { unlink($file) || warn file not deleted $file $!; } Thanks, Shirley
RE: new to perl
opendir (DH,server\\path); foreach (readdir DH){ if (/\.trn/){ unlink($_) or warn file $_ not deleted $!\n; } } Untested. HTH Paul -Original Message- From: Shirley Wiederholt [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 4:40 PM To: [EMAIL PROTECTED] Subject: new to perl Hi, This is my first email to beginner's Perl and sincerely hope I am sending this message to the right place. I want to delete some DB backup files using UNC pathing and perl. My code segment, which does not work, is listed below. I do not get any errors when I run this piece of code however, the files are not deleted either. Does anyone know what is wrong with the code? The file permissions are open to the world, the file was not in use, and I did try using (myserver\\e$\\LS_DbBackUp\\stdby30dev\\*.trn file:///\\myserver\e$\LS_DbBackUp\stdby30dev\*.trn ). What I found out so far is that my code works with Perl version 5.005_03, binary build 522 but not with ActivePerl-5.6.1-535-MSWin32-x86.msi or ActivePerl-5.8.0.806-MSWin32-x86.msi. Has anyone else come across this issue? What did you do to resolve it? Code segment foreach $file (myserver\\e\\LS_DbBackUp\\stdby30dev\\*.trn file:///\\myserver\e\LS_DbBackUp\stdby30dev\*.trn ) { unlink($file) || warn file not deleted $file $!; } Thanks, Shirley -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: new to perl
Shirley, I do almost the exact same thing in my database dump script. Here is the function that I use to remove older dump files. HTH, Chuck Fox code ### Prune Dumps Subroutine ### ### Description: ### This subroutine will remove all dumps that are older ### than the 48 hour aging period. ### ### Input Parameters: $ppdDumpDir = command run, ###$ppdDbName= message number, ###$ppdRetDate = message severity, ###$ppdDumpType = message state, ### ### Output Parameters: $ppdError ### sub pruneDumps { my( $ppdDumpDir ,$ppdDbName ,$ppdRetDate ,$ppdDumpType ) = @_; my( $ppdDumpFile ,$ppdError ,$ppdSaveError ,$ppdCmd ,$ppdLocalDumpType ,$ppdTmpTime1 ,$ppdTmpTime2 ,@ppdDumps ); my( $myMsg ); if( defined( $CONFIG{gDebugFlag} ) ) { $myMsg = sprintf(: pruneDumps(%s: Entering subroutine.)\n,__LINE__); logIt( $myMsg ); } if( defined( $CONFIG{gNoExecFlag} ) ) { if (defined($CONFIG{gDebugFlag})) { $myMsg = sprintf(: pruneDumps(%s: Running in noexec mode.)\n,__LINE__); logIt( $myMsg ); print \$ppdDumpDir=$ppdDumpDir\n; print \$ppdDbName=$ppdDbName\n; print \$ppdRetDate=$ppdRetDate\n; print \$ppdDumpType=$ppdDumpType\n; } } $myMsg = sprintf(: pruneDumps(%s: Getting dump file list.)\n,__LINE__); logIt( $myMsg ); opendir DUMPDIR,$ppdDumpDir; @ppdDumps = readdir DUMPDIR; closedir DUMPDIR; $ppdError = 0; if($ppdDumpType eq database) { $ppdLocalDumpType = _dump; } elsif( $ppdDumpType eq tran ) { $ppdLocalDumpType = _tran; } foreach $ppdDumpFile ( @ppdDumps ) { if ( $ppdDumpFile =~ /${ppdDbName}${ppdLocalDumpType}/ ) { open(RFILE,${ppdDumpDir}/${ppdDumpFile}); ( $ppdDev ,$ppdIno ,$ppdMode ,$ppdNlink ,$ppdUid ,$ppdGid ,$ppdRdev ,$ppdSize ,$ppdAtime ,$ppdMtime ,$ppdCtime ,$ppdBlksize ,$ppdBlocks ) = stat RFILE; close(RFILE); if( defined( $CONFIG{gNoExecFlag} ) ) { if( defined( $CONFIG{gDebugFlag} ) ) { $ppdTmpTime1 = localtime($ppdAtime); $ppdTmpTime2 = localtime($ppdRetDate); print \$ppdDumpFile = $ppdDumpFile\n\t\$ppdRetDate = $ppdTmpTime2\n\t\$ppdAtime = $ppdTmpTime1\n; } } if( $ppdAtime $ppdRetDate ) { $myMsg = sprintf(: pruneDumps(%s: Deleting dump file %s.)\n,__LINE__,$ppdDumpFile); logIt( $myMsg ); $ppdError = system( rm -f ${ppdDumpDir}/${ppdDumpFile} ); if ( $ppdError != 0 $ppdError != 256 ) { $myMsg = sprintf(: pruneDumps(%s: ERROR[%s] Deleting dump file %s.)\n,__LINE__,$ppdError,$ppdDumpFile); logIt( $myMsg ); $ppdSaveError = $ppdError; } } else { if( defined( $CONFIG{gDebugFlag} ) ) { $myMsg = sprintf(: pruneDumps(%s: Not deleting dump file %s.)\n,__LINE__,$ppdDumpFile); logIt( $myMsg ); } } } } return( $ppdSaveError ); } /code [EMAIL PROTECTED] wrote: Hi, This is my first email to beginner's Perl and sincerely hope I am sending this message to the right place. I
anyone found the code from the new Learning Perl 2 O'Reilly book?
I posted to the O'Reilly errata page for this, but have not seen an answer yet. Has anyone else found the referenced code from the new Learning Perl Objects, References, and Modules book? -K -- Kevin Pfeiffer International University Bremen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Brand new to Perl
Wiggins D'Anconia [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... ActivePerl is free. That's what I was trying to say :) /R -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Brand new to Perl
Hi group, I am quite new to perl. I will use Learning Perl, 3rd edition and my laptop that is running windows 98. What exactly the name of the file i should download to install perl into win98? Where can I download it? Any other recommended tutorials for beginners Thanks
Re: Brand new to Perl
On Thu, 2003-01-02 at 20:41, John Tafasi wrote: Hi group, I am quite new to perl. I will use Learning Perl, 3rd edition and my laptop that is running windows 98. Is that the O'Reilly book with the Llama on the cover? If so that is one of the best books for starting Perl with IMHO. What exactly the name of the file i should download to install perl into win98? Where can I download it? Go to www.activestate.com and follow the links for ASPN Perl, works well on win32 boxes, and the package manager is very good for when you start to want modules not included as standard. Any other recommended tutorials for beginners Well the Camel book; Programming Perl 3rd ed, also by O'Reilly is very good, even if you have no previous programming experience, as it explains everything clearly in fairly plain language. also the links below are useful:- http://www.perlmonks.org/index.pl?node=Tutorials http://www.perl.com/pub/q/resources http://webknowhow.net/dir/Perl/Tutorials/Beginner/ HTH -- James [EMAIL PROTECTED] invert to reply Linux- 'Cos Micro$oft is for Capitalists running DOS signature.asc Description: This is a digitally signed message part
Re: Brand new to Perl
Kegs, John ASPN Perl is a professional tool that you have to pay for. It includes Komodo and the Dev Kit - very nice but very expensive. If you have no budget then you want just ActivePerl from here: http://www.activestate.com/Products/ActivePerl/ Click on 'Download' at the top left to fetch the installation. (You don't need to fill int he form if you don't want to.) HTH, Rob Kegs [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Thu, 2003-01-02 at 20:41, John Tafasi wrote: Hi group, I am quite new to perl. I will use Learning Perl, 3rd edition and my laptop that is running windows 98. Is that the O'Reilly book with the Llama on the cover? If so that is one of the best books for starting Perl with IMHO. What exactly the name of the file i should download to install perl into win98? Where can I download it? Go to www.activestate.com and follow the links for ASPN Perl, works well on win32 boxes, and the package manager is very good for when you start to want modules not included as standard. Any other recommended tutorials for beginners Well the Camel book; Programming Perl 3rd ed, also by O'Reilly is very good, even if you have no previous programming experience, as it explains everything clearly in fairly plain language. also the links below are useful:- http://www.perlmonks.org/index.pl?node=Tutorials http://www.perl.com/pub/q/resources http://webknowhow.net/dir/Perl/Tutorials/Beginner/ HTH -- James [EMAIL PROTECTED] invert to reply Linux- 'Cos Micro$oft is for Capitalists running DOS -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Brand new to Perl
but i am looking for free software. Does any body know where I can download one for my windows 98 - Original Message - From: Kegs [EMAIL PROTECTED] To: John Tafasi [EMAIL PROTECTED] Cc: Perlbeginners [EMAIL PROTECTED] Sent: Thursday, January 02, 2003 1:59 PM Subject: Re: Brand new to Perl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Brand new to Perl
ActivePerl is free. http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl Or you can brave the world of Cygwin. http://www.cygwin.com , but then you would be diving into Perl and Unix at the same time, all within the safe confines of Windows. http://danconia.org John Tafasi wrote: but i am looking for free software. Does any body know where I can download one for my windows 98 - Original Message - From: Kegs [EMAIL PROTECTED] To: John Tafasi [EMAIL PROTECTED] Cc: Perlbeginners [EMAIL PROTECTED] Sent: Thursday, January 02, 2003 1:59 PM Subject: Re: Brand new to Perl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
New to Perl...
Hello, all I need to learn Perl fast, have some C and 4GL background. What is the best way for me to start? I have 2 books that I have started looking at. Programming Perl by Wall, Christiansen Schwartz and Perl Cookbook by Christiansen Torkington. I can download softwares into my PC, but I have to ftp over to my Solaris box from my PC. What do I need to get started playing around with Perl? Any suggestions would be most appreciated! Thanks. Tang Kim 256.722.4283 [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: New to Perl...
On Wednesday, August 14, 2002, at 08:27 , Kim, Tang (N-Raytheon) wrote: [..] I have 2 books that I have started looking at. Programming Perl by Wall, Christiansen Schwartz and Perl Cookbook by Christiansen Torkington. reasonably good choices to start with. You might want to fetch a) learning perl - 3rd edition b) the pocket guide to programming perl 3rd edition you can also read most of perl's internal documentation with perldoc perl and run through the basic information that is already there. I can download softwares into my PC, but I have to ftp over to my Solaris box from my PC. if you are running Solaris 8 or higher, it comes with perl 5.005_03 installed - and you will want to get on the road from there - learn a bit and then opt to get into the upgrade path to perl 5.8... ciao drieux http://www.wetware.com/drieux/pbl/perldoc where I hide the rest of the links to what I know about perl documentation that can be found on line. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: New to Perl...
on Wed, 14 Aug 2002 15:27:43 GMT, [EMAIL PROTECTED] (Tang Kim) wrote: I need to learn Perl fast, have some C and 4GL background. What is the best way for me to start? I have 2 books that I have started looking at. Programming Perl by Wall, Christiansen Schwartz and Perl Cookbook by Christiansen Torkington. I can download softwares into my PC, but I have to ftp over to my Solaris box from my PC. What do I need to get started playing around with Perl? Any suggestions would be most appreciated! Thanks. You probably also want to take a look at O'Reilly's Learning Perl (By Schwartz Phoenix). If you have previous programming experience you could probably go through it in a couple of days to get a feeling for the language. After that, the Camel will give you all the details, whereas the Cookbook is invaluable for solid example code. If you have the choice between Unix/Win32 platforms, pick the one that you will be developing for after you mastered the language. Perl is available for both, and although a lot of it is platform independent, there are some differences. -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]