How to limit Perl split function ?

Posted by joe on Stack Overflow See other posts from Stack Overflow or by joe
Published on 2010-05-19T17:34:30Z Indexed on 2010/05/19 17:40 UTC
Read the original article Hit count: 112

Filed under:
I have trying this : 

$string ="Group: ALL:ALL:Good";

@str2  = split (/:/,':',2);

print "@str2";

I am looking in $str[0] = Group  and $str[1]= ALL:ALL:Good

It not working . What would be issue ?

© Stack Overflow or respective owner

Related posts about perl