mercredi 7 septembre 2016

How to concatenate reverse if statement to string?

use DateTime::Format::Natural;
$parser = new DateTime::Format::Natural;
$dt = $parser->parse_datetime("1 Test 2010");
print "Date: " . ($dt->dmy('/') if $parser->success);

Why doesn't the last line compile?

Aucun commentaire:

Enregistrer un commentaire