<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3086" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New" size=2>Hi
All,</FONT></SPAN></DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New" size=2>I am trying
to add a day to a date using Perl Time::Local library within a Korn shell.
However it is not allowing my Korn shell variable to be used within the Perl
command.</FONT></SPAN></DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New"
size=2>MM=05</FONT></SPAN></DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New"
size=2>DD=06</FONT></SPAN></DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New"
size=2>YYYY=2007</FONT></SPAN></DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New"
size=2>DAY_ADDED=`perl -e 'use Time::Local; ($secs =
timelocal(0,0,0,$MM,$DD,$YYYY) + 86400); ($year, $mon, $day) =
(localtime($secs))[5,4,3]; $year+=1900; $mon =~ s/^/0/ if $mon < 10; $day =~
s/^/0/ if $day < 10; print $year . $mon . $day;';`</FONT></SPAN></DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New" size=2>echo
$DAY_ADDED</FONT></SPAN></DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New" size=2>I am getting
the following error:</FONT></SPAN></DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New" size=2>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New" size=2>Day '' out
of range 1..31 at -e line 1</FONT></SPAN></DIV></FONT></SPAN></DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New" size=2>Then I tried
the following and got a different error:</FONT></SPAN></DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New"
size=2>PERL_CMD="perl -e 'use Time::Local; (\$secs =
timelocal(0,0,0,$MM,$DD,$YYYY) + 86400); (\$year, \$mon, \$day) =
(localtime(\$secs))[5,4,3]; \$year+=1900; \$mon =~ s/^/0/ if \$mon < 10;
\$day =~ s/^/0/ if \$day < 10; print \$year . \$mon . \$day;
';"</FONT></SPAN></DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New"
size=2>DAY_ADDED=`${PERL_CMD}`</FONT></SPAN></DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New" size=2>Can't find
string terminator "'" anywhere before EOF at -e line 1.</FONT></SPAN></DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New"
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=174420221-11052007><FONT face="Courier New" size=2>What am I
doing wrong here? </FONT></SPAN></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV align=left><FONT face="Courier New" size=2>Peter</FONT></DIV></BODY></HTML>