in reply to Why doesn't system("zip -D") exclude directories?

See system for examples of passing arguments.

  • Comment on Re: Why doesn't system("zip -D") exclude directories?

Replies are listed 'Best First'.
Re^2: Why doesn't system("zip -D") exclude directories?
by YuTsun (Initiate) on May 05, 2010 at 18:37 UTC

    What would I be looking for? I of course checked perldoc before asking my question. As near as I can see, I have passed the arguments correctly.

    If you mean that I should pass the arguments in an array, I have tried passing arguments as an array but this made no difference: the directories were included in the zip file.

    @zipcommand = ("/usr/bin/zip", "-D", "$zipfile", "$somepath/*.$fileex +t");

    Moreover, when I use the array method, zip interprets the commandline redirects as filenames and cannot match the files if $fileext is a glob pattern like "*.jpg".