I would use grep and the % operator. Could also do it with the ternary operator and the % operator (although that is approaching too cute to maintain).
Update: based on other provided information in this thread, you may also want to see print, join, say, and chomp.
--MidLifeXis
In reply to Re: New student, can we write this program in perl...
by MidLifeXis
in thread New student, can we write this program in perl...
by rahulraina7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |