⟩ How to sort dates in Perl?
Example
-------
use Data::Dumper;
my @dates = ( "02/11/2009" , "20/12/2001" , "21/11/2010" ) ;
@dates = sort { join( '', (split '/', $a)[2,1,0] ) cmp
join( '', (split '/', $b)[2,1,0]) } @dates;
print Dumper @dates;
Example
-------
use Data::Dumper;
my @dates = ( "02/11/2009" , "20/12/2001" , "21/11/2010" ) ;
@dates = sort { join( '', (split '/', $a)[2,1,0] ) cmp
join( '', (split '/', $b)[2,1,0]) } @dates;
print Dumper @dates;
What is LENGTH in COBOL II?
What should be the sorting order for SEARCH ALL?
What is the difference between SEARCH and SEARCH ALL?
How do you define a table/array in COBOL?
What is the difference between index and subscript?
What does the IS NUMERIC clause establish?
What are the different data types available in COBOL?
What are 77 levels used for?
Name the divisions, which are available in a COBOL program?
What does the INITIALIZE verb do?