in reply to Executing external program via backquotes

Well, you're already surrounding the directory you're searching through with double quotes, now try surrounding the $_ argument with double quotes too:
@results = `grep -i "$_" $can_archive`;
-Scott

Replies are listed 'Best First'.
Re^2: Executing external program via backquotes
by King0 (Initiate) on Feb 10, 2010 at 22:35 UTC

    Thanks for the suggestion; I had that in my first version of the script -- but unfortunately double quoting $_ doesn't resolve the issue. Rather, when the argument is supplied to grep it some how breaks the argument into to separate ones, in spite of the variable being double quoted. For example, if the $_ variable held Jon Doe -- the error would be:

    grep Jon: No such file or directory grep Doe: No such file or directory
    Do you have any other suggestions? Thanks. -Dan