in reply to Calender billing_prt

... but you haven't asked a question yet, or showed us the code that you're lost in...

BTW, take a look at line 38 -- it's missing a semi-colon.

*My* tenacity goes to eleven...

Replies are listed 'Best First'.
Re^2: Calender billing_prt
by oikool (Novice) on Jan 23, 2014 at 22:09 UTC
    #!/usr/local/bin/perl @months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); @weekDays = qw(Sun Mon Tue Wed Thu Fri Sat Sun); ($second, $minute, $hour, $dayOfMonth, $month, $yearOffset, $dayOfWeek +, $dayOfYear, $daylightSavings) = localtime(); $year = 1900 + $yearOffset; $theTime = "$hour:$minute:$second, $weekDays[$dayOfWeek] $months[$mont +h] $dayOfMonth, $year"; print $theTime;

    this the above code im using it to capture system pc time, i wasnt able to use this time as actually im working on Staf automation. So im writing this perl script so that i can capture the time and use it in my xml code which is required for the billing. I will use this PC time and later generate bill accordingly which i wasnt able to do.(if i subscribed to a plan on say today 24th, he should be billed next month 21st). But my client requirement is that they require the billing according to postpaid customers.

      ... and you're wanting to know how to do *what* ?

      Perhaps sprintf() might be your friend:

      my @parts = localtime(time); my $now = sprintf('%04d-%02d-%02d %02d:%02d:%02d', $parts[5]+1900, $parts[4]+1, $parts[3], $parts[2], $parts[1], $parts[0]); print "The current date/time is $now.\n";

      *My* tenacity goes to eleven...
        i was asking how to call the system PC time that i have written in perl script and use it in the xml code .