in reply to Re: Substr Perl
in thread Substr Perl

sorry for my stupid questions but i'm actually no programmer ;), For example i have something like that:
my @member = $entry->get_value ('memberOf'); my @memberof = grep(/\CN=ext\.Group\.([^,]+)/,@member); $member = join(',',@memberof); print "$uid -- $member\n";
This code gives me the following output: Michael Douglas -- CN=ext.Group.eso,OU=External,OU=ExDistriGroups,OU=Accounts,DC=eso,DC=local,CN=ext.Group.test,OU=External,OU=ExDistriGroups,OU=Accounts,DC=eso,DC=local,CN=ext.Group.test1,OU=External,OU=ExDistriGroups,OU=Accounts,DC=eso,DC=local,CN=ext.Group.test2,OU=External,OU=ExDistriGroups,OU=Accounts,DC=eso,DC=local What i want is: Michael Douglas -- eso, test, test1, test2 Thanks Andy

Replies are listed 'Best First'.
Re^3: Substr Perl
by mba777 (Novice) on Nov 26, 2013 at 13:23 UTC
    map instead of grep was the solution for me, thank you hdb !! Tanks to all ;)