#!/usr/bin/perl -w
################################################################
# RandOrg.pl: Generate randim text.                            #
#--------------------------------------------------------------#
# Take a file of numbers 0...25 and transform it into a text   #
#   in A...Z.                                                  #
#                                                              #
# Inputfile from STDIN                                         #
# Outputtext to STDOUT                                         #
#--------------------------------------------------------------#
# No error handling                                            #
#--------------------------------------------------------------#
# Klaus Pommerening 2013-Dec-26, 2014-Jun-13                   #
#                                                              #
# This program is freeware. Use it as you like.                #
# Usual disclaimers apply.                                     #
################################################################

# Take a file of numbers 0...25 and transform it into a text in A...Z.
# The numbers must be separated by tabs or by line breaks.

$alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";# Our standard alphabet
                                         #   as string
@alphabet = split(//,$alphabet);         # and as list of characters

while ($line = <>) {                     # Read numbers in lines from standard input.
  @nlist = split(/\s/,$line);            # Decompose lines into single elements.
  foreach $jj (@nlist) {                 # Extract numbers from input line.
    print $alphabet[$jj];                # Transform to letters.
    }
  }
print "\n";
