in reply to Re^2: Array looping
in thread Array looping

Well, since the OP's post started with arrays rather than strings your golf is cheating slightly ;-)

However, if the problem comes from the real world I think the odds are better than even that the OP started with strings and split them into arrays in order to do the comparison. In that scenario your golf is fine, though anything other than "snippet" dna strings are unlikely to fit on the command line!

Cheers,

JohnGG

Replies are listed 'Best First'.
Re^4: Array looping
by vrk (Chaplain) on Apr 13, 2017 at 08:11 UTC

    Oh, it will work with file input too since it's reading from stdin. Just make sure the two sequences are separated by a space.