Re: f

2002-12-04 Thread Tirthankar C. Patnaik
Is this a snaFu? :) best, -tir On Wed, Dec 04, 2002 at 02:07:18AM -0800, Timothy Johnson gushed in an explosion of ASCII chars: My thoughts exactly. -Original Message- From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 11:06 PM To: [EMAIL

Multi-Dimensional Hashes.

2003-06-16 Thread Tirthankar C. Patnaik
Folks, This may be a naive query, but dashed if I know it. I have a large dataset, of financial data, and I need to check the results of some trading strategies on it. I have read the data into a hash of hashes of hashes, as I believe it's better than read this into an array (Or

Re: Understanding PERL statement

2002-01-19 Thread Tirthankar C. Patnaik
What does $ stand for in the following statement? print$_\t, * x $n, \n; $_ is the default input and pattern-searching space. Snipped from man perlvar: PERLVAR(1) Perl Programmers Reference Guide PERLVAR(1) NAME perlvar - Perl predefined variables DESCRIPTION

Re: delta time/date

2002-03-06 Thread Tirthankar C. Patnaik
You might want to try out the Date::Manip package. It has a function Date_Cmp which compares any two dates. You first read the date through the function ParseDate in the module, and then compare the dates through Date_Cmp. HTH, -tir -- Tirthankar, IGIDR. +91-22-8400919 x275 (r),

Re: write to an Excel document

2002-03-12 Thread Tirthankar C. Patnaik
Dear Allison, Does anyone know how to write to an Excel document? I've opened the document using OLE but I cannot find any documentation on how to store data in the spreadsheet. If anyone knows what the commands are to do this please let me know. Thanks, Try the

Trouble with Math::NumberCruncher

2002-03-15 Thread Tirthankar C. Patnaik
This might seem trivial, but it has me stumped. The variance of numbers 0..20 is 38.5. Then why does Math:NumberCruncher show it as 36.6667? Here's a sample prog, and it's output. Here test04.dat is a file that has numbers 0 to 20, on separate lines. #---start

Re: Trouble with Math::NumberCruncher (fwd)

2002-03-15 Thread Tirthankar C. Patnaik
Tirthankar C. Patnaik To: [EMAIL PROTECTED] [EMAIL PROTECTED]cc

Re: Splitting number into an array

2002-04-09 Thread Tirthankar C. Patnaik
Hi, perl -e '$r=123456789012345; @Re=split(//,$r); print join (|,@Re);' HTH, -tir Ol=10 Apr 2002, Daniel Falkenberg wrote: t(//,$r); print join (|,@Re);' Hey all, $card_no = 1234567901234567 # 16 digit number How would I go about splitting that number into an array?

Input | Program | Output : help

2002-04-12 Thread Tirthankar C. Patnaik
Folks, Consider this code snippet: Here $ParseFile is a plain-text file, which could be gzipped, bzipped, or not compressed at all. I'd like my program to determine this, open the file, and cat it to another program called discretise. In the code below, my(@PARSELIST) = @ARGV;

RE: Input | Program | Output : help

2002-04-12 Thread Tirthankar C. Patnaik
); READ is the input pipe ZIPIT is the output pipe Perl Gurus, Yeah I should have used the ZIP module.. I am too lazy to change it now. -Original Message- From: Tirthankar C. Patnaik [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 1:04 PM To: [EMAIL PROTECTED

RE: Input | Program | Output : help

2002-04-12 Thread Tirthankar C. Patnaik
, -tir perldoc IPC::Open2 -Original Message- From: Tirthankar C. Patnaik [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 1:52 PM To: Nikola Janceski Cc: [EMAIL PROTECTED] Subject: RE: Input | Program | Output : help I'm afraid I couldn't succeed

RE: Input | Program | Output : help

2002-04-12 Thread Tirthankar C. Patnaik
: $!; while(COMMAND){ print OUTPUT; } close COMMAND; close OUTFILE; -Original Message- From: Tirthankar C. Patnaik [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 2:00 PM To: Nikola Janceski Cc: [EMAIL PROTECTED] Subject: RE: Input | Program | Output : help

Re: Unix to dos; dos to unix...

2002-04-25 Thread Tirthankar C. Patnaik
hi Ron, another unix command is flip. i've written a small perl script that converts a dos file to a unix one. as you can see, i've just substituted the \r\n with a \n. the reverse can easily be done. this is a working example. it's not fast, but workable. i'd welcome

RE:Whats wrong with unlink?

2001-12-04 Thread Tirthankar C. Patnaik
The command is unlink $_path/* if -r $_path; This will work. HTH, -tir Hi, I wanted to delete all files under a directory but not the directory I tried this: my ($_path) = c:/EventLogs/; unlink $_path if -r $_path; But it didn't delete teh files which are under the directory

RE:What's wrong with unlink?

2001-12-04 Thread Tirthankar C. Patnaik
You might want to check the permissions of those files. The command works fine here. But I guess the mistake is that you're working on Windows, and there you have a back-slash ( \ ) instead of a slash ( / ). Try this: my ($_path) = c:\EventLogs; unlink $_path/* if -r $_path; This should

Re: problem executing linux command in perl

2001-12-04 Thread Tirthankar C. Patnaik
Are you giving the propoer syntax? your command should've been: chmod 0777, $r_file; # added the comma. HTH, -tir On Tue, 4 Dec 2001, Rahul Garg wrote: Hi, I am transfering xyz.txt file from windows98 to linux server manually. $r_file = xyz.txt ; then in perl

Re: Re[2]: What's wrong with unlink?

2001-12-04 Thread Tirthankar C. Patnaik
this: #!/usr/bin/perl -w $_dir = /tmp/dummy/; unlink $_dir/* if -r $_dir; exit; This prog worked on v5.6.1 built for i386-linux. Best, -tir --- Hello Tirthankar, Tuesday, December 04, 2001, Tirthankar C. Patnaik [EMAIL PROTECTED] wrote: TCP You

Time since midnight.

2001-12-05 Thread Tirthankar C. Patnaik
I have a set of timestamps, which are seconds since midnight. say, 36000 36001 36002 . I'd like to convert them into the format: 10:00:00 10:00:01 . Can I do this using Date::Manip, failing, which, is there any other way in perl? TIA, -tir --

Re: Time since midnight.

2001-12-05 Thread Tirthankar C. Patnaik
Could you give a specific code? Also, apropos to my earlier mail, can this be done using Date::Manip? -tir On Wed, 5 Dec 2001, [EMAIL PROTECTED] wrote: On Wed, 5 Dec 2001, Tirthankar C. Patnaik wrote: Date: Wed, 5 Dec 2001 14:18:35 +0530 (IST) From: Tirthankar C. Patnaik [EMAIL

Re: Time since midnight.

2001-12-05 Thread Tirthankar C. Patnaik
$ perl -le'use Time::Local; my $time = timelocal(0,0,0,5,11,101); print scalar localtime($time); print scalar localtime($time + 36_000); ' Wed Dec 5 00:00:00 2001 Wed Dec 5 10:00:00 2001 Thanks a lot. -tir On Wed, 5 Dec 2001, John W. Krahn wrote: Tirthankar C. Patnaik wrote

Re: Time since midnight.

2001-12-05 Thread Tirthankar C. Patnaik
, Jenda Krynicky wrote: From: Tirthankar C. Patnaik [EMAIL PROTECTED] I have a set of timestamps, which are seconds since midnight. say, 36000 36001 36002 . I'd like to convert them into the format: 10:00:00 10:00:01 . Can

test mail. Please ignore.

2001-12-17 Thread Tirthankar C. Patnaik
This is a test mail, please delete. -tir -- Tirthankar, IGIDR. +91-22-8400919 x275 (r), x593(o), x(542), +91-22-8421206 (r) http://www.igidr.ac.in/~tir Into the mouth of hell Rode the six hundred. -Tennyson -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: How to detect the correct OS:

2002-01-14 Thread Tirthankar C. Patnaik
Try uname -a On my machine: uname -a gives, OSF1 brahma.igidr.ac.in V5.1 1885 alpha HTH, -tir On Tue, 15 Jan 2002, Chris Anderson wrote: I need to find out which OS I am on - It would be nice to know: Ref Hiat