"this is the one which i wrote by myself if its wrong plz letme knw"
I'm sure if you ran your script you'd see it was wrong, in the sense that it doesn't work. Here is an example which does what I think you are trying to do:
Now I'm sure you know what you're trying to achieve with your code, I don't. My code prints the value of $word1 if the value is "chr1.subst.fa" or "Hcr1fa.fa". You'll see from the code and the comments that I added quotes around chr1.subst.fa, are you expecting this string or are you trying to match something else?
When you previewed your post, you must have seen that something was wrong with the formatting. Your closing code tag should be </code> rather than <\code>.
Here are some links I think you should read and understand:
In reply to Re: perl programme to sort out snps from human genome ....plz suggest me the right way . iam confused how to write