Re: Saturdays in a month

2009-12-23 Thread Chris Charley
- Original Message - From: Venkat Saranathan Newsgroups: perl.beginners To: Johnson, Reginald (GTS) Cc: beginners@perl.org Sent: Tuesday, December 22, 2009 10:27 AM Subject: Re: Saturdays in a month You can code a simple time logic to calculate this. Here is a sample code. (Bugs incl

RE: Saturdays in a month

2009-12-23 Thread Johnson, Reginald (GTS)
Just wanted to thank you guys for responding. For my needs the solution proposed by Venkat worked almost perfectly. I only needed to modify so that I would get the actual date that the 5th Saturday fell on. My subroutine looks like for ($mon = $month; $mon == $month; $time += 86400) { my (

Re: Tool used by Perl developers to design the flow of Perl Projects.

2009-12-23 Thread Shlomi Fish
Hi Parag! In addition to what Shawn said, here is what I know. On Wednesday 23 Dec 2009 14:53:51 Parag Kalra wrote: > Hello All, > > Uptil now I have been coding fairly simple Perl scripts. > > Lately I have started designing some complex scripts. And I always felt > that if you place the logi

Re: How to install SNMP_Session.pm

2009-12-23 Thread Shlomi Fish
On Wednesday 23 Dec 2009 14:53:08 Raheel Hassan wrote: > Hi, > > I need to install SNMP_Session.pm in Fedora core 12, can any one guide me > how i can install this package and from where i get this. It is working in > my ubuntu machine but in fedora i am unable to find. > I did a CPAN search and

Re: How to install SNMP_Session.pm

2009-12-23 Thread Erez Schatz
2009/12/23 Raheel Hassan : > Thanks for your reply Schatz. Yes i installed many modules using the same > method but the problem that i am facing this time is due to this package > SNMP_session.pm. In CPAN also i am unable to find this package. Where as in > Ubuntu it is present in /usr/share/perl5/

Re: How to install SNMP_Session.pm

2009-12-23 Thread Raheel Hassan
Thanks for your reply Schatz. Yes i installed many modules using the same method but the problem that i am facing this time is due to this package SNMP_session.pm. In CPAN also i am unable to find this package. Where as in Ubuntu it is present in /usr/share/perl5/SNMP_Session.pm, i do not know from

Re: Tool used by Perl developers to design the flow of Perl Projects.

2009-12-23 Thread Shawn H Corey
Parag Kalra wrote: > Hello All, > > Uptil now I have been coding fairly simple Perl scripts. > > Lately I have started designing some complex scripts. And I always felt that > if you place the logic and flow of the script on paper first then coding > part is simplified to a great extent. And upti

Re: How to install SNMP_Session.pm

2009-12-23 Thread Erez Schatz
2009/12/23 Raheel Hassan : > Hi, > > I need to install SNMP_Session.pm in Fedora core 12, can any one guide me > how i can install this package and from where i get this. It is working in > my ubuntu machine but in fedora i am unable to find. > (Warning: I have zero experience in Fedora/Red Hat, s

Tool used by Perl developers to design the flow of Perl Projects.

2009-12-23 Thread Parag Kalra
Hello All, Uptil now I have been coding fairly simple Perl scripts. Lately I have started designing some complex scripts. And I always felt that if you place the logic and flow of the script on paper first then coding part is simplified to a great extent. And uptil now I have mainly used pen and

How to install SNMP_Session.pm

2009-12-23 Thread Raheel Hassan
Hi, I need to install SNMP_Session.pm in Fedora core 12, can any one guide me how i can install this package and from where i get this. It is working in my ubuntu machine but in fedora i am unable to find. Regards, Raheel.

Re: Regexp to remove spaces

2009-12-23 Thread Dr.Ruud
sftriman wrote: 1ST PLACE - THE WINNER: 5.0s average on 5 runs # Limitation - pointer sub fixsp5 { ${$_[0]}=~tr/ \t\n\r\f/ /s; ${$_[0]}=~s/\A //; ${$_[0]}=~s/ \z//; } Just decide to change in-place, based on the defined-ness of wantarray. sub trim { no warnings 'uninitialized'; if

Re: XML::Simple question

2009-12-23 Thread Mike Blezien
- Original Message - From: "Jenda Krynicky" To: "Perl List" Sent: Tuesday, December 22, 2009 6:44 PM Subject: Re: XML::Simple question From: "Mike Blezien" Hello, were using the XML/Simple module to process a XML response using the code below. But for some reason the

Re: Saturdays in a month

2009-12-23 Thread Shlomi Fish
On Tuesday 22 Dec 2009 17:27:41 Venkat Saranathan wrote: > You can code a simple time logic to calculate this. Here is a sample code. > (Bugs included :)) Yes, indeed. :-) Bugs are included. See below for my comments. > > #!/usr/bin/perl > > use Time::Local; > use strict; > You should add us

Re: Saturdays in a month

2009-12-23 Thread Venkat Saranathan
You can code a simple time logic to calculate this. Here is a sample code. (Bugs included :)) #!/usr/bin/perl use Time::Local; use strict; sub day_in_a_month { my ($week_day, $month, $year ) = @_; my ($day, $hour, $min, $sec, $time); my ($mon, $wday_count); $day = 1; $hour