More Spaghetti

Bill Ott bott at grpl.org
Wed Oct 6 10:36:50 CDT 1999


If it is to be called spaghetti, then it shall look like spaghetti!
This is about as messy as I could come up with.

Again, no cheating by running the code, but you'd still have to explain
it...
--
Bill Ott      bott at grpl.org
--------------------------
###
###  What does the following print? ...and how (why)?
###

print map {$_->[3]} sort {$a->[1] <=> $b->[1] ||
    $a->[2] <=> $b->[2] ||$a->[3] cmp $b->[3]}
map {[$_,(split /y/)[2,1,0]]}@x=<DATA>;

__DATA__
he_scy123y888yaaa
er_esy9y123yabc
r_undy343y23yayz
nevey09y23yaba
timaty222y138yaba
hwartzy1y999yduh
_powey223y145ybbc
e_they223y138yabc
r_of_ty555y333yxyz




More information about the grand-rapids-pm-list mailing list