use Shell qw(oggenc); # ("bar.wav" doesn't exist, so errors of the form "cannot open input file # 'bar.wav' indicate the command is being parsed correctly. "Multiple input # files" type errors indicate that the spaced argument is being seen as two.) # All the system() calls work... # ERROR: Cannot open input file "bar.wav": No such file or directory system("oggenc -o foo.ogg -c " . quotemeta("composer=J. Random Hacker") . " bar.wav"); # ERROR: Cannot open input file "bar.wav": No such file or directory system("oggenc", "-o", "foo.ogg", "-c", "composer=J. Random Hacker", "bar.wav"); # None of the Shell.pm ones do. # ERROR: Multiple input files with specified output filename: suggest using -n oggenc("-o", "foo.ogg", "-c", "composer=J. Random Hacker", "bar.wav"); # ERROR: Multiple input files with specified output filename: suggest using -n oggenc("-o", "foo.ogg", "-c", quotemeta("composer=J. Random Hacker"), "bar.wav"); # ERROR: Multiple input files with specified output filename: suggest using -n oggenc("-o foo.ogg -c " . quotemeta("composer=J. Random Hacker") . " bar.wav");