#!/usr/bin/perl # decode_template.pl - Don Yang (uguu.org) # # 12/26/08 use strict; my $input = join '', <>; foreach my $c ($input =~ /\S/gs) { if( $c eq "!" ) { print "\n"; } elsif( $c ge "]" ) { print "X" x (ord($c) - ord("]") + 1); } else { print " " x (ord($c) - ord("(") + 1); } }