I have a perl script:
use Date::Manip ;
$main::TZ='GMT' ; ##set this to your time zone
&Date_Init("DateFormat=US"); ##enforce mm/dd format for all dates.
sub calc_wrk ($$) {
print &UnixDate(Date_NextWorkDay(@_),do{$_[1]>0? "$_[1] working days from today would be":"Today is"}. " %A, the %E of %B, %Y\n") ;
}
my ($d,$m,$y)=(localtime)[3,4,5] ;
my $date=join '/',($m+1,$d,$y+1900) ;
calc_wrk($date,0) ;
calc_wrk($date,10) ;
calc_wrk($date,15) ;I set up a global called 'workdays' and cut and paste this code surrounded by sub {}. However, when I did a static build with the page containing the global the output acutally appeared in the build script not on the page as inteneded. What do I need to change to make the output show on my html page?
Many Thanks.
Alex
Indigo Clothing is a t-shirt printing company based in the UK.
Indigo Clothing | Promotional Clothing | T-Shirt Printing | Embroidery
Code:
use strict ; use Date::Manip ;
$main::TZ='GMT' ; ##set this to your time zone
&Date_Init("DateFormat=US"); ##enforce mm/dd format for all dates.
sub calc_wrk ($$) {
print &UnixDate(Date_NextWorkDay(@_),do{$_[1]>0? "$_[1] working days from today would be":"Today is"}. " %A, the %E of %B, %Y\n") ;
}
my ($d,$m,$y)=(localtime)[3,4,5] ;
my $date=join '/',($m+1,$d,$y+1900) ;
calc_wrk($date,0) ;
calc_wrk($date,10) ;
calc_wrk($date,15) ;
Many Thanks.
Alex
Indigo Clothing is a t-shirt printing company based in the UK.
Indigo Clothing | Promotional Clothing | T-Shirt Printing | Embroidery