Your script is horrible to read, it's prone to creating zombie processes and it doesn't even compile.
So, no, you're not doing it properly.
I was hoping that some other monk would tell you that more politely, but no one did, so I'm just telling you like it is.
As for what is wrong: $output and $fver are not declared anywhere, so use strict aborts compilation. wait in a SIGCHLD handler is just wrong, because it waits only for one child, but:
... when the signal is delivered to the process by the system (to the C code that implements Perl) a flag is set, and the handler returns immediately.
Then at strategic "safe" points in the Perl interpreter (e.g. when it is about to execute a new opcode) the flags are checked and the Perl level handler from %SIG is executed.
...
As the Perl interpreter looks at signal flags only when it is about to execute a new opcode, a signal that arrives during a long-running opcode (e.g. a regular expression operation on a very large string) will not be seen until the current opcode completes.
If a signal of any given type fires multiple times during an opcode (such as from a fine-grained timer), the handler for that signal will be called only once, after the opcode completes; all other instances will be discarded.
In addition, the flag-setting handler in perl blocks SIGCHLD signal while it's executing; and only one blocking signal can be pending, so, if two or more children die during that, you'll get at least one zombie.
Recommended fix:
$SIG{CHLD} = 'IGNORE';
Recommended reading:
perldoc perlstyle
perldoc strict
perldoc perlipc
man 7 signal
man 2 wait
man 2 sigaction
perldoc -f wait
perldoc -v '%SIG'
Also, see "The Linux Programming Interface", chapters 20-22 (applicable to all Unix-like systems, not only Linux).