in reply to Re: Find Comma in a string
in thread Find Comma in a string

What I really needs I have user credentials in a older system in jdoe,dept,comp and I need it in fully distiguisded to manipulate using ldap like cn=jdoe,ou=dept,o=comp.

Replies are listed 'Best First'.
Re: Re: Re: Find Comma in a string
by waswas-fng (Curate) on Jun 27, 2003 at 20:11 UTC
    $input_string = "jdoe,dept,comp\n"; chomp $input_string; ($cn_temp, $ou_temp, $o_temp) = split /,/ , $input_string; print "cn=$cn_temp,ou=$ou_temp,o=$o_temp\n";
    will print "cn=jdoe,ou=dept,o=comp" -- Perl has many wonderful string tools, you dont have to do it like C. =)

    -Waswas