#/usr/bin/perl -w
use Date::Manip;
$time = &DateCalc("today","+ 30 days");
$time1 = print (&UnixDate($time,"%m/%d/%Y"));
# Here print prints the return value of UnixDate (05/01/2004)and assigns the
return value of 1 to $time1

chomp $time1;
# chomp does nothing but waste cpu cycles

print "$time1\n";
# print prints the value of $time1, (assigened earlier to 1) and a newline.


bash-2.03$ perl delart.pl
05/01/20041 <------ here


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Robert
Sent: Thursday, April 01, 2004 2:01 PM
To: [EMAIL PROTECTED]
Subject: Small perl code help!!


Hi list,
When I execute this piece of code, it is always putting 1 at the end, anyone
know 
how to get rid of this?

#/usr/bin/perl -w
use Date::Manip;
$time = &DateCalc("today","+ 30 days");
$time1 = print (&UnixDate($time,"%m/%d/%Y"));
chomp $time1;
print "$time1\n";


bash-2.03$ perl delart.pl
05/01/20041 <------ here


Thanks in advance





Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway - Enter today
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to