Skip to content

Instantly share code, notes, and snippets.

@DingoEatingFuzz
Created January 23, 2012 23:18
Show Gist options
  • Save DingoEatingFuzz/1666309 to your computer and use it in GitHub Desktop.
Save DingoEatingFuzz/1666309 to your computer and use it in GitHub Desktop.
Which line of perl is better?
my $date_range = join('-', map { DateTime->new($_)->yyyymmdd(); } splice(@array_of_args, 2, 2));
my $date_range = DateTime->new($array_of_args[2])->yyyymmdd() . '-' . DateTime->new($array_of_args[3])->yyyymmdd();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment