| Mariano Cunietti 2005-01-25, 3:56 pm |
| On Tue, 2005-01-25 at 18:55, Ankur Gupta wrote:
>
> Mariano Cunietti wrote:
> Not a problem.. just reverse it... look at the push statement below.
> Let me know if I am still missing anything..
>
> my (@dest_users);
> while(<ALIASES> )
> {
> next if(/^[\s]*$/);
> next if(/^[\s]*#/);
> next if(/:include:/);
> chomp;
> my ($alias,$realusers)=split(/:/,$_);
> #print $aliases."\n";
> $realusers =~ s/[\s]//g;
> @dest_users=split(/,/,$realusers);
> my ($destination);
> #print "ALIAS: $alias\n";
> foreach $destination (@dest_users) {
> push ( @{$inversealias{$destination}}, $alias);
> }
> }
foreach $destination (@dest_users) {
push( @{$aliases{$destination}},$alias);
}
}
my $key;
foreach $key ( keys %aliases ){
print "$key: @{$aliases{$key}}\n\n";
}
thank you all ;-)
--
-----------------------------
Mariano Cunietti
System Administrator
Enter S.r.l.
Via Stefanardo da Vimercate, 28
20128 - Milano - Italy
Tel. +39 02 25514319
Fax +39 02 25514303
mcunietti@enter.it
www.enter.it - www.enterpoint.it
-----------------------------
Gruppo Y2K - www.gruppoy2k.it
|