Robert [EMAIL PROTECTED] wrote:
> 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

The line:

  $time1 = print (&UnixDate($time,"%m/%d/%Y"));

is printing the the date and return code of 1 is then
stored in $time1. Later you print $time1. Maybe you just
want:

  $time1 = &UnixDate($time,"%m/%d/%Y");

--
Mike Arms

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to