That depends on whether a shell will interpret the command line that includes the file name. If it will, quotemeta should do it, along with handling lots of other gotchas.
$ perl -e'$_ = "foo bar baz"; print quotemeta, $/' foo\ bar\ baz $
If there is no shell interpretation, you probably don't need to escape them.
After Compline,
Zaxo
In reply to Re: Escape blank spaces
by Zaxo
in thread Escape blank spaces
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |