in reply to how to split a string and take certain position?

Your syntax on the first is nearly right.
my $sentence = "5:83:24"; print ( ( split /:/, $sentence )[1] ); # prints 83
Your second one can be done as:
print ( ( split /:/, $sentence )[-1] );
These both use what are known as slices. There's info on slices in perlintro, although I think that just deals with slices of named arrays. List slices specifically are in perldata. Lots of PM nodes have examples of slices as well.

Slices can be a little tricky at first, and getting print to see your slice as a single item to print is another issue. Printing the evaluation of the slice accounts for the need to use the outer set of parentheses here.