If only people started to read the docs before complaining that a function doesn't work as they want. Besides that, it's completely useless to call an external program for some functionality that Perl can provide by itself.
First of all, system() does not return the output of a command, but just runs it. What is returned is the exit status of the command, which is the 0 you're seeing. Second, simple date calculation in Perl:
$ cat date.pl
#!/usr/bin/perl
use strict;
use warnings;
use POSIX qw/strftime/;
my $time1 = time();
my $time2 = time - ( 24 * 60 * 60 );
my $yes1 = strftime '%d-%m-%Y', localtime($time1);
my $yes2 = strftime '%d-%m-%Y', localtime($time2);
print "$yes1\n";
print "$yes2\n";
$ perl date.pl
19-07-2010
18-07-2010