<<
it looks like some sort of variable command in some language...
but what the heck does this mean?
$last =~ s/^(\w\w\w)\w+,\s(\d+)-([^-]+)-(\d+)\s([\d:]+).*/$1 $3 $2 $5 $4/;

>>
$last <- varaible name
=~ <- regex operator
s <- substitution
/STUFF/NEWSTUFF/ <- replaces STUFF with NEWSTUFF
^ <- beginning of string
() <- character grouping
\w <- word character
+ <- any number (greater than 0) of preceeding character
, <- jsut a plain comma
\s <- whitespace
() <- second character group
\d+ <- any number (greater than 0) of digits
- <- plain dash
() <- another group
[^-]+ <- anything that's not a dash, more than 0 times....
repeat dash
repeat digits
repeat group
\s <- whitespace
[\d:]+ anything that's a digit or a colon, matched more than 0 times
.* <- anything, any number of times.
$1 $3 $2 $5 $4 <-- character groups (from above) #1, 3, 2, 5, and 4.