Hi GrandFather, thanx for the quick reply!
I apologize, but I think I have made a mistake in my question.
Forget about the $substring, I just need to print out the last 4 characters of $string, that is NOPQ...
Shall I use -1 in my substr function to start counting backwards?
Thank you!