Ahmed Moustafa wrote:
> 
> Hi Dan,
> 
> Try this:
> 
> # --
> %flags=();
> foreach $user ( keys (%popusers) ) {
>         if (-e "/home/$user/test.pl") {
>                 $flags{$user} = "YES";
>         } else {
>                 $flags{$user} = "NO";
>         }
> }
> # --
> 
Or quite a little shorter:
%flags = map {($_ => (-e "/home/$_/test.pl" ? "YES" : "NO"))} keys
%popusers;

Best Wishes,
Andrea

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

Reply via email to