in reply to iterating through scalar

... can i only print required characters in a scalar element

Adressing the second half of your question: There are ways to print only specific character that exist in a scalar (without modifying it), yes. What is the actual requirement?

Cheers, Sören

Créateur des bugs mobiles - let loose once, run everywhere.
(hooked on the Perl Programming language)