I have a Perl program I am editing. The idea is to have it write a record to another file whenever a user access this program. Here is the Perl code I am using:
open(MYFILE, ">>/usage.file");
print MYFILE "USERID: `whoami` used this on DATE: `date` \n";
close MYFILE;
the problem is that the UNIX commands (whoami and date) are not evaluated so it puts the exact string, as is, into the file.
How do I get the UNIX commands to be evaluated for userid and date?
thanks