Hi,
Wishing you a very Happy New Year!! I am new to perl and I need to know that how to get the current date & time in my perl script. I am working on Windows XP. my code snippet is like this:
[code=perl]
#! usr/bin/perl -w
$logfilename = "logfileLOV ";
$dateAndtime = `date`;
$dateAndtime =~ tr// /;
$logfilename = $logfilename. "_" .$dateAndtime;
print "$logfilename\n ";
[/code]
I have tried running this on command prompt but its not working. Can someone please assist me in this
Thanks
Rocko
Wishing you a very Happy New Year!! I am new to perl and I need to know that how to get the current date & time in my perl script. I am working on Windows XP. my code snippet is like this:
[code=perl]
#! usr/bin/perl -w
$logfilename = "logfileLOV ";
$dateAndtime = `date`;
$dateAndtime =~ tr// /;
$logfilename = $logfilename. "_" .$dateAndtime;
print "$logfilename\n ";
[/code]
I have tried running this on command prompt but its not working. Can someone please assist me in this
Thanks
Rocko
Comment