#!/usr/bin/perl @in = split(//, <<'END'); You cannot pass,' he said. The orcs stood still and a silence fell. `I am a servant of the Secret Fire, wielder of the Flame of Anor. You cannot pass. The dark fire will not avail you, flame of Udun. Go back to the Shadow. You cannot pass!' END $res = "J"; @order = qw(2 13 9 3 5 6 1 9 18 19 32 10 11 29 32 45 41 88 22 33 158 57 78 25); $res .= $in[$_] for @order; print $res;