RE: rename and move multiple files

2005-10-23 Thread Timothy Johnson
Did this turn into the bash list while I was gone? The point about the OP not letting us know what he/she has tried is a good one, but why respond to inadequate information with off-topic information? -Original Message- From: Elie De Brauwer [mailto:[EMAIL PROTECTED]

Module subclassing

2005-10-23 Thread Peter Rabbitson
Hi list, I am trying to subclass Math::Currency to change the default bstr() and move it to a different function, so my numbers are not formatted by default (I am unable to just strip existing formatting in a certain situation). Here is what I did: package Tools::Currency; use base qw(Math::C

Re: rename and move multiple files

2005-10-23 Thread Elie De Brauwer
perlwannabe wrote: I have a file I download everyday, let's call it "output.txt." The file "output.txt" is saved in a directory by date, for example 10012005 (for Oct. 1, 2005). I have a years worth of output files in my c:\ drive. Now I have to rename each output file so that I can copy all o

Re: rename and move multiple files

2005-10-23 Thread John W. Krahn
perlwannabe wrote: > I have a file I download everyday, let's call it "output.txt." The file > "output.txt" is saved in a directory by date, for example 10012005 (for Oct. > 1, 2005). I have a years worth of output files in my c:\ drive. Now I have > to rename each output file so that I can copy

rename and move multiple files

2005-10-23 Thread perlwannabe
I have a file I download everyday, let's call it "output.txt." The file "output.txt" is saved in a directory by date, for example 10012005 (for Oct. 1, 2005). I have a years worth of output files in my c:\ drive. Now I have to rename each output file so that I can copy all of the output to a sin

Re: map/array performance

2005-10-23 Thread Jeff 'japhy' Pinyan
On Oct 23, Frank Bax said: my $aval=''; map { $aval=$aval.sprintf("%4d",$aSuit{$a}{$_}); } @f_seq; my $aval=''; foreach $f (@f_seq) { $aval=$aval.sprintf("%4d",$aSuit{$a}{$f}); } You should be using $aval .= here, instead of $aval = $aval . And as John has shown, join()

Re: map/array performance

2005-10-23 Thread John W. Krahn
Frank Bax wrote: > At 02:11 PM 10/23/05, John W. Krahn wrote: > >> Frank Bax wrote: >> > my $snew = >> > sprintf("%4d%4d",$aSuit{$new}{'rescap'},$aSuit{$new}{'resval'}); >> > my $slow = >> > sprintf("%4d%4d",$aSuit{$low}{'rescap'},$aSuit{$low}{'resval'}); >> >> Using sprintf() to c

Re: map/array performance

2005-10-23 Thread Frank Bax
At 04:35 PM 10/23/05, Frank Bax wrote: At 02:11 PM 10/23/05, John W. Krahn wrote: Frank Bax wrote: > my $snew = > sprintf("%4d%4d",$aSuit{$new}{'rescap'},$aSuit{$new}{'resval'}); > my $slow = > sprintf("%4d%4d",$aSuit{$low}{'rescap'},$aSuit{$low}{'resval'}); Using sprintf() to

Re: map/array performance

2005-10-23 Thread Jeff 'japhy' Pinyan
On Oct 23, Frank Bax said: At 02:11 PM 10/23/05, John W. Krahn wrote: Frank Bax wrote: > my $aval=''; map { $aval=$aval.sprintf("%4d",$aSuit{$a}{$_}); } @f_seq; > my $bval=''; map { $bval=$bval.sprintf("%4d",$aSuit{$b}{$_}); } @f_seq; You shouldn't use map in void context, you sho

Re: map/array performance

2005-10-23 Thread Frank Bax
At 02:11 PM 10/23/05, John W. Krahn wrote: Frank Bax wrote: > my $snew = > sprintf("%4d%4d",$aSuit{$new}{'rescap'},$aSuit{$new}{'resval'}); > my $slow = > sprintf("%4d%4d",$aSuit{$low}{'rescap'},$aSuit{$low}{'resval'}); Using sprintf() to concatenate numbers is (AFAIK) going to

Re: map/array performance

2005-10-23 Thread John W. Krahn
John W. Krahn wrote: > Frank Bax wrote: >>Rather than create/store/sort many billion entities, my script creates >>these entities dynamically and maintains a hash of the "top 100". As >>each entity is created, I search my hash for the entity with "lowest" >>value, based on a number of elements in

Re: map/array performance

2005-10-23 Thread John W. Krahn
Frank Bax wrote: > Rather than create/store/sort many billion entities, my script creates > these entities dynamically and maintains a hash of the "top 100". As > each entity is created, I search my hash for the entity with "lowest" > value, based on a number of elements in the hash; then "low" el

map/array performance

2005-10-23 Thread Frank Bax
Rather than create/store/sort many billion entities, my script creates these entities dynamically and maintains a hash of the "top 100". As each entity is created, I search my hash for the entity with "lowest" value, based on a number of elements in the hash; then "low" element gets replaced w

Re: getting authors' names right (was Re: Project planning)

2005-10-23 Thread Randal L. Schwartz
> "Jeff" == Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> writes: Jeff> Granted, I'm not an author, and I rarely (if ever) see my name Jeff> misspelled, but as a matter of courtesy, I'd really appreciate seeing Jeff> Damian Conway's name spelled properly, and Randal (L.) Schwartz's name Jeff> spelle

Re: delete file after on week

2005-10-23 Thread Jessica Rasku
ZHAO, BING wrote: Hi: I need to delete files older than one week old, I know how to code that(with the help of many kind people on this list): But it only happens when I run the program, there is a chance I will not be running the program for more than a week. And the d