I need a script to display each months name .. but this only displays the varable name i.e $month10 ..
my $month1 = "January";
my $month2 = "February";
my $month3 = "March";
my $month4 = "April";
my $month5 = "May";
my $month6 = "June";
my $month7 = "July";
my $month8 = "August";
my $month9 = "September";
my $month10 = "October";
my $month11 = "November";
my $month12 = "December";
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
$mon = $mon+1;
$year = $year+1900;
$hour = sprintf("%02d", $hour);
$min = sprintf("%02d", $min);
$sec = sprintf("%02d", $sec);
$mday = sprintf("%02d", $mday);
$mon = sprintf("%02d", $mon);
$_ = '$month'.$mon;
$Current_Month = $_;
print "$Current_Month";
Result = $month10 not October ..
Any ideas?
my $month1 = "January";
my $month2 = "February";
my $month3 = "March";
my $month4 = "April";
my $month5 = "May";
my $month6 = "June";
my $month7 = "July";
my $month8 = "August";
my $month9 = "September";
my $month10 = "October";
my $month11 = "November";
my $month12 = "December";
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
$mon = $mon+1;
$year = $year+1900;
$hour = sprintf("%02d", $hour);
$min = sprintf("%02d", $min);
$sec = sprintf("%02d", $sec);
$mday = sprintf("%02d", $mday);
$mon = sprintf("%02d", $mon);
$_ = '$month'.$mon;
$Current_Month = $_;
print "$Current_Month";
Result = $month10 not October ..
Any ideas?