You don't show the code where you get $uname, but five bucks says it's because `uname -r` is returning a string with a newline on the end, and you aren't chomping it, so it doesn't match when that string is followed by more text. It does work when the text in question happens to be the last text on a line, because in that case it is followed by a newline.
Aaron B.
Available for small or large Perl jobs; see my home node.
In reply to Re: Search and replace within a file
by aaron_baugher
in thread Search and replace within a file
by muizelaar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |