$sentence = "5:83:24"; print split(/:/, $sentence)[1]; #returns 83 #### split(/:*/, $sentence); #which should return 24