in reply to Converting Date to String

Use Time::Piece to handle the date conversion. The following program works for files specified on the command line without path, so you have to cd to the containing directory before running it.
#! /usr/bin/perl use warnings; use strict; use Time::Piece; for my $file (@ARGV) { open my $IN, '<', $file or do { warn "Can't open '$file', skipping.\n"; next }; <$IN>; # Skip the first +line. my $date_string = <$IN>; chomp $date_string; # Remove newline. my $date = 'Time::Piece'->strptime($date_string, '%B %d, %Y'); rename $file, $date->ymd(q()) . "-$file" or warn "Can't rename $fi +le\n"; }
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ