#!/usr/bin/perl

# zero_separated:
# This script reads a list of strings (one per line) from STDIN
# and outputs those strings to STDOUT separated by zeros.
#
# This is useful, for example, to generate a spelling dictionary
# in the format apparently used by OS X's built-in spell checker.
# See: ~/Library/Spelling/en
# 
# Cameron Hayne (macdev@hayne.net)  June 2005

use strict;
use warnings;

my $zerobyte = pack("B8", 0);
while (<>)
{
    chomp();
    print "$_$zerobyte";
}

