Hacker News new | ask | show | jobs
by mekazu 4079 days ago
I'd usually use 'perl -n -e' if I needed something like this. Not suggesting that perl is a better alternative but it's a reason why I'd never need to use that tool.

Here's the corresponding perl program using the same data and output as on the transformy home page:

  pbpaste | perl -p -e 's/(\d+), (\w+) (\w+), (\w+), (\w+)/@{[uc($3)]}, jersey number $1/'
To use that (pbpaste I think is a mac only feature) first copy / paste that into your terminal, then copy the list, then hit enter in the terminal.