Skip to content

Instantly share code, notes, and snippets.

@hiragram
Created March 9, 2016 09:56
Show Gist options
  • Select an option

  • Save hiragram/bab2cb3ef9048eb54897 to your computer and use it in GitHub Desktop.

Select an option

Save hiragram/bab2cb3ef9048eb54897 to your computer and use it in GitHub Desktop.
while($i=<STDIN>){chomp($i);@j=split(/ /, $i);@h=split(/,/, $j[0]);foreach(reverse(@h)){substr($j[1], $_, 0)=" "}print($j[1]."\n");}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment