in reply to Re^2: Why is grep not searching for contents?
in thread Why is grep not searching for contents?
When learning the basics, you might try looking closely at just one thing at a time. Rather than having your whole script fall apart, look at what just one call or construct is doing. Understand what it does and how it should be used. Then look at the larger context it is being used in. Try printing the arguments (use Data::Dumper if they are not simple) to make sure you are feeding it what you intended. Make a miniature test calling just that one thing with the parameters ready to go. If that's OK, then shift your focus to how those values are being prepared for that use.