in reply to Convert date into day and month
while (<FH>) { chomp; my ($date, $file_name) = split(","); $date =~ s@\r|\n@@g; # get rid of trailing newlines, however forma +tted
When you read line by line with while (<FH>) you don't need to worry about extra newlines. You chomp()'ed the one off. If you gave us some example lines from your Date.csv file it would be easier to see what you are trying to do. Better yet, add the lines to your perl file after __DATA__ and use while (<DATA>)so we can quickly download your code and test.
|
|---|