A very shoddy way of doing it, but you could put what you want to do in
another script, call system() and place it in the background so you original
script doesn't wait for it to return.

.....
system "perl script.pl any arguments &";
.....

I assume this would work, but am not 100% sure without trying it.

Yes, it works great:

#!/usr/bin/perl

use strict;
use warnings;

print "start\n";
system "perl -e 'sleep(3);`echo system >> long.txt`;' &";
print "end\n";
print "exec\n"; # do it at the end instead with exec() not sure if there is an advantage of either one in this case besides maybe return from system()
exec "perl -e 'sleep(3);`echo exec >> long.txt`;' &";


I agree an external script isn't real great but it does have the effect I wanted thank you so much for the great idea!

--
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