Have simple piece of code
__RESULT__
1:234
How can I get the result like 12:34 instead using the join function?
Is the only way to do this?
Code:
$string = "1234";
@val = join(':',split(//,$string,2));
print @val;
1:234
How can I get the result like 12:34 instead using the join function?
Is the only way to do this?
Code:
@val = split (//,$string);
print $val[0].$val[1].":".$val[2].$val[3];