in reply to Sorting Dates Issue
However there are no default variables $c or $d so your code would not run.use strict; ... sub compare { $a =~ /(\d{2})\/(\d{2})\/(\d{4})/; $c = $3 . $1 . $2; $b =~ /(\d{2})\/(\d{2})\/(\d{4})/; $c = $3 . $1 . $2; $c <=> $d; }
The fact that you assign the two compound numbers to the same variable may be your issue, use warnings; would have noted this.
|
|---|