karthikm897 I think you have an architecture problem. It appears that you are trying to splice perl into the middle of system interactions ('date' with no passed value) Whenever possible you are better off sticking to pure system calls or writing everything in perl. To choose the perl route, do some investigation around the functionality you are trying to implement not the call/response management of that functionality from the system. perl is amazingly powerful and you will probably not need a system call at all. (System calls in perl code are often categorized as "code smell")
With that said if you still want to follow system capture as a tactic, check out this stackoverflow search.