in reply to Confusion with Unzip and GREP
Seeing how you check the length of @ARGV, you should really read the tutorial on context. That's surely where your problem with grep comes from, becauses it returns the list of matches in list context, and the number of matches in scalar context. So you certainly added a scalar context somewhere when trying to see what grep does.
Maybe File::Find could help you on searching your file in a depth-independant way.
Edit: by the way, your test at the beginning of the script could have been written if (@ARGV != 1), that's what makes it look like you don't understand context very well.
|
|---|