in reply to print problem

Hello yueli711,

Welcome to the Monastery. Also read a similar question asked before on the forum that answers your problem with different multiple ways to solve it.

See How do I find the index of a specific array value?.

Hope this helps, BR.

Seeking for Perl wisdom...on the process of learning...not there...yet!