#!/usr/bin/perl # http://perlmonks.org/?node_id=1120349 use strict; use warnings; my $keyboard = <' x ($col - $oldcol), '<' x ($oldcol - $col); ($oldrow, $oldcol) = ($row, $col); print $press; } print "\n";