Could someone give me some suggestions to correct my PERL script? I'm new at programming in general, and I can't figure out where I am going wrong.
In the beginning of the script I declare the following:
($sec,$min,$hr,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year+=1900;
$mon++;
$bkupset=$year.$mon.$mday;
The thought is that when I run the script, I want to create a directory based on the date that I am running the script in the following format:
/tmp/bkup/yyyymmdd
Now when I run the script today, the directory is labeled as
/tmp/bkup/200773
In other words in single digit months and single digit days, the zeros are truncated I would like them to read 20070703 in the example given above.
In the beginning of the script I declare the following:
($sec,$min,$hr,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year+=1900;
$mon++;
$bkupset=$year.$mon.$mday;
The thought is that when I run the script, I want to create a directory based on the date that I am running the script in the following format:
/tmp/bkup/yyyymmdd
Now when I run the script today, the directory is labeled as
/tmp/bkup/200773
In other words in single digit months and single digit days, the zeros are truncated I would like them to read 20070703 in the example given above.
