# This might come closer to what you want.
foreach my $log (@NBlogs2) {
if ($log =~ m{([[:alpha:]]+)/log.\d+}) {
my $word = $1;
my $number = $subdir_for{$word};
qx(echo cp $log $oldir/$number);
}
}
On 08/29/2006 01:46 PM, Derek B. Smith wrote:
[...]
If I change $number to $word is obviously does the
copy correctly, but what is the point of
my $number = $subdir_for{$word};
???
Forget it. Do what works. :-)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
All,
I am trying to run logic that will copy/delete 3
versions of log.\d+ files to their respective
directories. Because there are so many directories, I
have built a hash table instead of using a bunch of
if else conditions with reg exps. My problem is it
is not returning the words_num
Trivial problem.
What does $words *really* contain in your subrotuine words_to_num?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
Derek B. Smith wrote:
All,
Hello,
I am trying to run logic that will copy/delete 3
versions of log.\d+ files to their respective
directories. Because there are so many directories, I
have built a hash table instead of using a bunch of
if else conditions with reg exps. My problem is it
--- John W. Krahn [EMAIL PROTECTED] wrote:
Derek B. Smith wrote:
All,
Hello,
I am trying to run logic that will copy/delete 3
versions of log.\d+ files to their respective
directories. Because there are so many
directories, I
have built a hash table instead of using a bunch
On 08/28/2006 08:37 AM, Derek B. Smith wrote:
All,
I am trying to run logic that will copy/delete 3
versions of log.\d+ files to their respective
directories. Because there are so many directories, I
have built a hash table instead of using a bunch of
if else conditions with reg exps.
Derek B. Smith wrote:
--- John W. Krahn [EMAIL PROTECTED] wrote:
Derek B. Smith wrote:
I am trying to run logic that will copy/delete 3
versions of log.\d+ files to their respective
directories. Because there are so many
directories, I
have built a hash table instead of using a bunch
of
if