Hopefully this will help...
I had
a similar problem with system() on W2K (with IIS 4), where I waited to catch a
return but nothing happened, but from a command line it seemed workable. I
ended up using backticks instead. I also had to put my actual command into
a variable because the command line input expects quotes throughout, and it
was just too painful otherwise (nothing worked). Here's the subroutine, so
you can gauge the context. Everything started working after I made the
change.
sub OpenRequest { UpdateUserInfo(); print PERLLOG "$now: starting OpenRequest...\n"; $frg_cmd = "bop_cmd -f e:\\caisd\\site\\mods\\majic\\web_cust_make_request.frg"; $log_agent = "1852"; $frg_string = "\"make_request($log_agent, $rd_id, '', 0, 0, 0, '$summary', '$prob_description', '')\""; # tried the system call first but was getting back funkiness # backtick method - supported on both Win* and *nix platforms - made it do my bidding $new_req_id = `$frg_cmd $frg_string` or die "$now: unable to process frg file due to backtick failure : $?"; print PERLLOG "$now: $frg_cmd $frg_string \n"; print PERLLOG "$now: created req with persid $new_req_id"; FetchReqNum(); Ending(); return; } exit;
|
- System Command Hangs Perl Forward Design
- Re: System Command Hangs Perl $Bill Luebkert
- RE: System Command Hangs Perl Johnson, Nicole
- RE: System Command Hangs Perl Jenda Krynicky