%squares = ( a1 => $a1, a2 => $a2, a3 => $a3, b1 => $b1, b2 => $b2, b3 => $b3, c1 => $c1, c2 => $c2, c3 => $c3 ); #### # makes the moved piece blank sub make_blank() { $squares{$response} = " "; }