"John W. Krahn" <[EMAIL PROTECTED]> writes: > Harry Putnam wrote: >> >> I'm not used to writing perl scripts on windows. I'm having a >> problem where a system call dies but still performs the command. >> I don't think I understand how exit status is checked.
Thanks posters... yes you've all helped me get lined out. John wrote: > Did you read the documentation for system()? > > perldoc -f system Yes, I did. But apparently the tools (Uwin) that I have installed don't work that well in winxp env. At least not the less pager it uses. perldoc -f system shows me: system LIST system PROGRAM LIST Does exactly the same thing as "exec LIST", except that a fork is done first, and the parent process waits for the child pro- cess to complete. Note that argument processing varies depend- ing on the number of arguments. If there is more than one argument in LIST, or if LIST is an array with more than one value, starts the program given by the first element of the list with arguments given by the rest of the list. If there is only one scalar argument, the argument is checked for shell metacharacters, and if there are any, the entire argument is passed to the system’s command shell for parsing (this is "/bin/sh -c" on Unix platforms, but varies on other platforms). If there are no shell metacharacters in the argument, it is split into words and passed directly to "execvp", which is more efficient. Beginning with v5.6.0, Perl will attempt to flush all files opened for output before any operation that may do a fork, but this may not be supported on some platforms (see perlport). And no amount of space bar pressing or down arrow will show any more. Its kind of funny because I remembered you had posted something like this in another thread I started a while back. I went looking for it but didn't turn it up. Then when I saw the manpage I thought maybe I'd confused your post with something else. I see now that I can get the rest of the manpage with Ctrl-f .. Thanks for the heads up. [...] > Why not use perl's built-in mkdir() function? > > mkdir $target or die "Can't mkdir $target: $!"; Yes, much nicer for my usage .... thanks. Does perl also have some compression module? My script uses tar but I'm having trouble because of the win habit of using spaces in file names. In fact, on that problem.... is there some sort of standard way that perl handles that problem on windows? Maybe some specialized module or etc? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>