Here's a nice short one for budding deconstructors.

cheers

tachyon

$_="uccsm jhvkqldtr oee hofaxrtaajshkebuwelrnpitgnpry!"; $_= join$\,sort/(..)/g and print ucfirst join$/,/.(.)/g;

Replies are listed 'Best First'.
Re: JAPH - short sort
by srawls (Friar) on Jun 15, 2001 at 06:04 UTC
    I'll do this in the readmore tag to give others a chance to respond too:

    The 15 year old, freshman programmer,
    Stephen Rawls

Re: JAPH - short sort
by dimmesdale (Friar) on Jun 16, 2001 at 01:20 UTC
    Here's how I think it works. . .
    $_="uccsm jhvkqldtr oee hofaxrtaajshkebuwelrnpitgnpry!"; #The join/sort statement turns the string into this: # ajbucsdte fagnhoitjhkelrm npoeprqlr shtaucvkwexry! #This is becuase the list passed to sort is what is #returned by the /(..)/g match; i.e., groups of two #The print statement joins every other character, via the #/.(.)/g statement with a newline($/); that prints out #the desired output, i.e., just anotherp perl hacker(\n separated) $_= join$\,sort/(..)/g and print ucfirst join$/,/.(.)/g;