in reply to Re^4: Can't get the desired output..
in thread Can't get the desired output..
If you want to print out "Cobray" if the string contains "Cobray", then why don't you just do that? Change your print "$name" to print "Cobray".
In Section
Seekers of Perl Wisdom