Skip to content

Instantly share code, notes, and snippets.

Created December 6, 2013 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/7825671 to your computer and use it in GitHub Desktop.
Save anonymous/7825671 to your computer and use it in GitHub Desktop.
868 clarkema@odin:~ > cat foo
weather.bbc.co.uk
bbc.co.uk
news.bbc.co.uk
869 clarkema@odin:~ > cat foo | perl -waln -F'\.' -e 'print join ".", reverse @F' | sort
uk.co.bbc
uk.co.bbc.news
uk.co.bbc.weather
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment