in reply to Effective way in perl

Assuming that $swlist constains a command having to do with HP's package system, I don't see much improvement. You'll have to spawn seperate processes anyway, and the grep utility is pretty fast.

However, it seems you are doing the same command twice, sending the resulting output to two different files; you could send the output to a (temp) file once, and then concat the output to both $log_std_depot and $temp_log.

And if you aren't using the output of the pipe chain (which wouldn't make sense, as you're sending that to the files anyway), you might prefer system over backticks.