Looping Dates.

2008-01-18 Thread sara.samsara
I am stuck here, I want to get list of dates in a certain range. Like: Start Date: 2007-01-03 to End Date: 2007-05-30 I am pointless here as what should I do in order to get all dates between start and end? Is there any for, foreach loop or other method? that will generate a list of dates:

Re: Looping Dates.

2008-01-18 Thread Aruna Goke
[EMAIL PROTECTED] wrote: I am stuck here, I want to get list of dates in a certain range. Like: Start Date: 2007-01-03 to End Date: 2007-05-30 I am pointless here as what should I do in order to get all dates between start and end? Is there any for, foreach loop or other method? that will

RE: Looping Dates.

2008-01-18 Thread Duck McDonald
Sara, I'm just a novice, but there is come code and info which may help (using the perl module: date::range) at: http://search.cpan.org/~tmtm/Date-Range-1.40/lib/Date/Range.pm HTH, Duck McDonald -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, January

Re: Looping Dates.

2008-01-18 Thread Owen
I am stuck here, I want to get list of dates in a certain range. Like: Start Date: 2007-01-03 to End Date: 2007-05-30 I am pointless here as what should I do in order to get all dates between start and end? Is there any for, foreach loop or other method? that will generate a list of dates:

Re: help me in reading the xml file

2008-01-18 Thread Chas. Owens
On Jan 18, 2008 4:34 AM, Allam Reddy, Thomas [EMAIL PROTECTED] wrote: Hi Chas Owens, Thanks for your reply. I am getting the following error when running the code given in the mail. Can't locate XML/Twig.pm in @INC (@INC contains: snip XML::Twig is not part of Core Perl. It (and its

how to get timezone in perl

2008-01-18 Thread Yue Chen
Greetings, perl fans I am about to translate a bash script into perl. In bash script, it uses date +%Z command to get current timezone on local host. However, I don't want to redirect this output into a variable, since the perl script will even going to be run on windows. Is there a module to

Re: Threaded chat server

2008-01-18 Thread Turner
On Jan 17, 8:44 am, [EMAIL PROTECTED] (Zentara) wrote: On Wed, 16 Jan 2008 14:08:14 -0800 (PST), [EMAIL PROTECTED] (Turner) wrote: On Jan 16, 11:50 am, [EMAIL PROTECTED] (Zentara) wrote: On Tue, 15 Jan 2008 19:18:02 -0800 (PST), [EMAIL PROTECTED] I think you may have misunderstood me.

RE: help me in reading the xml file

2008-01-18 Thread Allam Reddy, Thomas
Hi Chas Owens, Thanks for your reply. I am getting the following error when running the code given in the mail. Can't locate XML/Twig.pm in @INC (@INC contains: /opt/perl_32/lib/5.8.3/IA64.ARCHREV_0-thread-multi /opt/perl_32/lib/5.8.3

RE: help me in reading the xml file

2008-01-18 Thread Allam Reddy, Thomas
Hi Chas Owens, Thanks for your reply. Is there a way to parse and get the info from xml withou using XML::Twig? Thanks, Thomas Reddy -Original Message- From: Chas. Owens [mailto:[EMAIL PROTECTED] Sent: Friday, January 18, 2008 3:11 PM To: Allam Reddy, Thomas Cc: beginners@perl.org

want to download HTML::JFilter

2008-01-18 Thread axtens
G'day everyone I'd like to download HTML::JFilter but I can't find it on Jenda's page. Anyone got a copy they can send me? Kind regards, Bruce. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: find2perl

2008-01-18 Thread joe blow
I am not a liar! I am a Christian Presumably, Christians don't lie. Is that it? Not to stir up the pot or anything... - Looking for last minute shopping deals? Find them fast with Yahoo! Search.

RE: Help in system function

2008-01-18 Thread Irfan.Sayed
Hello Rob, I just want to find out whether command(mk_view $view_name ETC) is properly running or not. In order to acieve this I have written this code. Please suggest what needs to be done to get the proper output. Please help Regards Irfan. -Original Message- From: Rob Dixon

Re: Searching text file and printing to new file

2008-01-18 Thread Rob Dixon
Gunnar Hjalmarsson wrote: [EMAIL PROTECTED] wrote: On Jan 14, 5:08 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: [EMAIL PROTECTED] wrote: I have a large text file with information essentially broken into lines like this: findable text with a regexp information I care about more findable

Re: Can't understand this code snippet

2008-01-18 Thread yitzle
On 1/18/08, bootleg86 bootleg86 [EMAIL PROTECTED] wrote: Hi, I can't for the life of me figure out what this is trying to do $token = $$ ^ unpack %L*, `ps -A | ./bin/gzip Just seems to be it's trying to generate some random number. I only know it's trying to XOR the process ID. What does

Fwd: help me die verbosely

2008-01-18 Thread Jonathan Mast
-- Forwarded message -- From: Jonathan Mast [EMAIL PROTECTED] Date: Jan 18, 2008 10:50 AM Subject: Re: help me die verbosely To: Chas. Owens [EMAIL PROTECTED] OK, so were binding an anonymous subroutine to the DIE signal? Does this need to go above or below troublesome code in

Re: want to download HTML::JFilter

2008-01-18 Thread Jenda Krynicky
To: beginners@perl.org From: axtens [EMAIL PROTECTED] Subject:want to download HTML::JFilter Date sent: Fri, 18 Jan 2008 02:07:07 -0800 (PST) Organization: http://groups.google.com G'day everyone I'd like to download

Re: Help in system function

2008-01-18 Thread Tom Phoenix
On Jan 18, 2008 7:00 AM, [EMAIL PROTECTED] wrote: I just want to find out whether command(mk_view $view_name ETC) is properly running or not. I think you're looking for the program's exit status. Traditionally on Unix and many similar systems, the exit status is an integer, with 0 meaning

Re: Can't understand this code snippet

2008-01-18 Thread Jenda Krynicky
From: yitzle [EMAIL PROTECTED] On 1/18/08, bootleg86 bootleg86 [EMAIL PROTECTED] wrote: Hi, I can't for the life of me figure out what this is trying to do $token = $$ ^ unpack %L*, `ps -A | ./bin/gzip Just seems to be it's trying to generate some random number. I only know it's

Re: help me die verbosely

2008-01-18 Thread Chas. Owens
On Jan 18, 2008 10:51 AM, Jonathan Mast [EMAIL PROTECTED] wrote: snip #!/usr/bin/perl use strict; use warnings; $SIG{__DIE__} = sub { open my $fh, , something.log or die @_, could not open something.log: $!; print $fh @_; }; die Oops; snip OK, so were binding

Hash of hashes?

2008-01-18 Thread Kevin Viel
This I cannot get my mind around... My data: SNP Genotype 1 CC 1 CT 1 TT 1 NN It seems to me that I need a hash of hashes. Inner hash: $inner{ $Genotype }++ ; Since the value of the out hash ( $outer{ $SNP } ) has to be a scalar, this scalar has to be a reference to

Re: help me die verbosely

2008-01-18 Thread Chas. Owens
On Jan 18, 2008 2:45 PM, Andy Greenwood [EMAIL PROTECTED] wrote: snip $SIG{__DIE__} = sub { open my $fh, , something.log or die @_, could not open something.log: $!; print $fh @_; }; die Oops; Would this not be susceptible to infinite recursion if it fails to open

Re: Can't understand this code snippet

2008-01-18 Thread Tom Phoenix
On Jan 18, 2008 7:45 AM, bootleg86 bootleg86 [EMAIL PROTECTED] wrote: I can't for the life of me figure out what this is trying to do $token = $$ ^ unpack %L*, `ps -A | ./bin/gzip Well, it's not complete, for one thing. What comes next? Just seems to be it's trying to generate some random

Clear a hash

2008-01-18 Thread Kevin Viel
Is there a way to empty/clear a hash in mass? For instance: %hash = {} ; Might the above create an reference? Thank you, Kevin Kevin Viel, PhD Post-doctoral fellow Department of Genetics Southwest Foundation for Biomedical Research San Antonio, TX 78227 -- To unsubscribe, e-mail: [EMAIL

Re: Help in system function

2008-01-18 Thread reader
Tom Phoenix [EMAIL PROTECTED] writes: On Jan 18, 2008 7:00 AM, [EMAIL PROTECTED] wrote: I just want to find out whether command(mk_view $view_name ETC) is properly running or not. I think you're looking for the program's exit status. Traditionally on Unix and many similar systems, the

Re: find2perl

2008-01-18 Thread Chas. Owens
On Jan 17, 2008 3:52 PM, oryann9 [EMAIL PROTECTED] wrote: snip Will anyone help me with this issue? These three lines of code work, but work in a way that I am not expecting. When I tell this module to set no_chdir to 1 it should NOT descend directories yet it does. Am I supposed to have a

Re: Clear a hash

2008-01-18 Thread Chas. Owens
On Jan 18, 2008 11:57 AM, Kevin Viel [EMAIL PROTECTED] wrote: Is there a way to empty/clear a hash in mass? For instance: %hash = {} ; Might the above create an reference? snip The above does create a reference. In fact, the hash will now contain something like %hash = (

Re: Can't understand this code snippet

2008-01-18 Thread bootleg86 bootleg86
Thanks all! I was wondering why the author didn't just call rand. I checked the rest of the source and it's just used as a unique identifier. So using rand would have been much easier. If that were my program, running under any modern perl version, I'd exploit the fact that Perl's random

Re: Clear a hash

2008-01-18 Thread yitzle
See http://perldoc.perl.org/functions/delete.html Generally speaking (ie yes, there are exceptions), there is no reason to ever want to delete a variable. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Searching text file and printing to new file

2008-01-18 Thread Gunnar Hjalmarsson
Rob Dixon wrote: Gunnar Hjalmarsson wrote: [EMAIL PROTECTED] wrote: On Jan 14, 5:08 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: open my $IN, '', 'infile.txt' or die $!; open my $OUT, '', 'outfile.txt' or die $! while ( $IN ) { print $OUT scalar $IN if

Re: help me in reading the xml file

2008-01-18 Thread Chas. Owens
On Jan 18, 2008 4:54 AM, Allam Reddy, Thomas [EMAIL PROTECTED] wrote: Hi Chas Owens, Thanks for your reply. Is there a way to parse and get the info from xml withou using XML::Twig? snip There are many XML parsing modules in Perl; unfortunately, none of the are part of Core Perl. In fact,

Can't Install Perl as Non-Root

2008-01-18 Thread Liam
Hi! I was trying to install a personal version of Perl to my own user folder. I am running on a remote webserver that uses Apache. I have succeeded with the following steps: wget http://perl.com/CPAN/src/stable.tar.gz tar zvxf stable.tar.gz cd perl-5.8.8 sh Configure -de

Re: how to get timezone in perl

2008-01-18 Thread Chas. Owens
On Jan 18, 2008 6:47 AM, Yue Chen [EMAIL PROTECTED] wrote: Greetings, perl fans I am about to translate a bash script into perl. In bash script, it uses date +%Z command to get current timezone on local host. However, I don't want to redirect this output into a variable, since the perl

Can't understand this code snippet

2008-01-18 Thread bootleg86 bootleg86
Hi, I can't for the life of me figure out what this is trying to do $token = $$ ^ unpack %L*, `ps -A | ./bin/gzip Just seems to be it's trying to generate some random number. I only know it's trying to XOR the process ID. What does this part do? unpack %L*, `ps -A | ./bin/gzip Thanks -- To

Re: Searching text file and printing to new file

2008-01-18 Thread Tri Trinh
On Jan 18, 10:27 am, [EMAIL PROTECTED] (Rob Dixon) wrote: Gunnar Hjalmarsson wrote: [EMAIL PROTECTED] wrote: On Jan 14, 5:08 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: [EMAIL PROTECTED] wrote: I have a large text file with information essentially broken into lines like this:

Re: help me die verbosely

2008-01-18 Thread Andy Greenwood
Chas. Owens wrote: On Jan 17, 2008 9:54 AM, Jonathan Mast [EMAIL PROTECTED] wrote: I want to write the errors caught by a 'die' clause into a file. snip Try #!/usr/bin/perl use strict; use warnings; $SIG{__DIE__} = sub { open my $fh, , something.log or die @_, could not

Re: Hash of hashes?

2008-01-18 Thread Chas. Owens
On Jan 18, 2008 6:06 PM, Kevin Viel [EMAIL PROTECTED] wrote: This I cannot get my mind around... My data: SNP Genotype 1 CC 1 CT 1 TT 1 NN It seems to me that I need a hash of hashes. Inner hash: $inner{ $Genotype }++ ; Since the value of the out hash (

Re: Clear a hash

2008-01-18 Thread Aaron Priven
I think you want %hash = (); which will make sure there are no elements in %hash. Your statement was %hash = {}; In this case, the {} will return a reference to an empty hash, and the assignment will then attempt to make this reference into a key in %hash. Since hash keys can only be