i have wriiten the following code to fetch date from server and to display it in yy/mm/dd-hh/mm/ss format.
#!/usr/bin/perl
system(`date '+ %Y/%m/%d-%H:%M:%S' >ex.txt`);
open(MYINPUTFILE, "/tmp/ranjan/ex.txt");
while(<MYINPUTFILE>)
{
chomp;
print "$_\n";
}
close(MYINPUTFILE);
output:
2013/07/29-18:58:04
I want to add two minutes to the time and need to replace the time present in a file, Pls give me some ideas.