Nikola -
        An interesting point. Perhaps you are onto something, but an eval where
you suggested does not work. However, you comments lead me to other
ideas to try.
Thanks,
Dick



Nikola Janceski wrote:
> 
> I can't make sense of the code. Sorry, but this is what I see looking back..
> 
> [map {[ 'command', $_,-command=>sub{$test_path="$tests_directory"."/"."$_";
> print "$test_path\n";}]}@test_files];
> 
> This line... you will understand if broken up by some white space
> 
> [
>         map {
>                 [ 'command',
>                 $_,
>                 -command=>sub{$test_path="$tests_directory"."/"."$_";
>                                 print "$test_path\n";}
>                 ]
>         }
>         @test_files
> ];
> 
> Notice how you created an anonymous subrouting with $_ in it?
> sub{$test_path="$tests_directory"."/"."$_";
>                                 print "$test_path\n";}
> 
> Well... $_ doesn't get changed to its current value at that point in your
> program.
> $_ will be whatever $_ is when you actually run the anonymous subroutine.
> 
> Remember when writing subroutines, especiallly anonymous ones, that are used
> by Tk, they don't get "eval"ed until the subroutine is called.
> 
> maybe someone can tell me if I am right, but wouldn't he need to do
> something like this?:
> 
> sub{$test_path= eval{"$tests_directory"."/"."$_"}
>                                 print "$test_path\n";}
> 
> -Nik
> 
> ----------------------------------------------------------------------------
> --------------------
> The views and opinions expressed in this email message are the sender's
> own, and do not necessarily represent the views and opinions of Summit
> Systems Inc.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to