Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
On OSes other than VMS, Perl's glob operator (and the <...> form) use File::Glob underneath. File::Glob splits the pattern into words, before feeding each word to its bsd_glob function.
There were several inconsistencies in the way the split was done. Now quotation marks (' and ") are always treated as shell-style word delimiters (that allow whitespace as part of a word) and backslashes are always preserved, unless they exist to escape quotation marks. Before, those would only sometimes be the case, depending on whether the pattern contained whitespace. Also, escaped whitespace at the end of the pattern is no longer stripped [perl #40470].
One possible solution would be to quote the string only if it contains whitespace, e.g.: