Invoke unix command with perl and get the results for further analysis?

New member
i.e. to invoke a "date" Unix command in a perl script and store the output in a variable as a string, say $var_results, so that the current date information could be used in the scripts.

Or the output of a command could be very long and it would take a long time to finish the command, say to run some other scripts. I also need to invoke such command in perl and analysis the results. How do i implement this?

Thanks
 
If you want the date, you should use the Date::Manip module.
If you want to execute a command and get its output, use the system() built-in Perl function
 
Back
Top