#!/usr/local/bin/perl # Jaime Prilusky, 2003 # test with 1 blue red yellow green # or 2 blue red yellow green $|=1; $target = shift @ARGV; @value = @ARGV; $jump{1} = \&row; $jump{2} = \&column; $jump{$target}(@value) if (defined $jump{$target}); sub row { my(@a) = @_; print "@a","\n"; } sub column { my(@a) = @_; foreach $a (@a) { print "[$a]\n"; } }