Perl equivalent of shell for &
I wrote a spinner in Perl and when I did a spinner in shell I could just run the subroutine in the background.
my_spinner &;
PID=$!;
#do something here
my_spinner_stop $PID;
In Perl, how do you run a function in a background and get the PID for that? I know PID in Perl is $$
thanks,
listener
Last edited by listener; 03-26-2010 at 10:37 AM.
|