maybe adding
use Win32; Win32::SetChildShowWindow(Win32::SW_HIDE); [download]
In reply to Re: Closing console window in Windows by lamprecht in thread Closing console window in Windows by Proclus