#!/usr/bin/env perl use strict; use warnings; my $a = '2014-02-01'; my $b = '2017-01-01'; warn "yes" if $a < $b; warn "no" if $a > $b;