in reply to Using the Substr
splitting the string at the colons and joining the first three fields seems the easiest way to me:
join( ':',(split /:/,$string)[0..2] )
Electric eels were invented at the same time as electricity
Before electricity was invented, electric eels had to stun with gas
Results (298 votes). Check out past polls.