in reply to Find the common initial substring (prefix if you insist)
sub cis { (join( "\0", @_) =~ m/^([^\0]*)[^\0]*(\0\1[^\0]*)*$/)[0] } Thanks to ChemBoy for pointing an omission and compacting into one statement.
-- stefp