From: Gary Stainburn <[EMAIL PROTECTED]>
> On Friday 16 Apr 2004 3:00 pm, Jenda Krynicky wrote:
> > From: aroushdi <[EMAIL PROTECTED]>
> >
> > > I am writing a script to ask for some variables , construct the
> > > command then launch  the command with qx or backtick . The command
> > > works fine . My problem is that the command monopolizes a console
> > > session ( I can kill it and my fired command still works ) . what
> > > i need is to fir the command in the background and exit the perl
> > > shell . any suggestions ur help is greatly appreciated
> >
> > Why do you use qx or backticks if you aparently do not want to
> > capture the program's output? You should be using system() instead.
> >
> > And if you want system() start the program and return immediately
> > you just use it like this:
> >
> >     system( 1, 'the_program and parameters');
> > or
> >     system( 1, 'the_program', @parameters);
> 
> Hi Jenda,
> 
> this struck me as odd, so I looked at 'perldoc -f system' and nowhere
> does it mention returning immediately, nor does it mention putting
> anything before the program name.

Yeah this is an "undocumented feature". Don't really understand why, 
because unlike the Unixish
        system( 'program params &')
this is actually portable.

The only place I found this documented are the perlport and 
perl56delta and perl561delta manpages. But it is being used in 
IPC::Open3, Shell.pm, IO::Pipe and PPM::Installer::Local.pm.

> Are there any other gems about system that arn't in the docs.

Don't know.

Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to