#!/usr/bin/perl -w use strict; han('A','B','C',$ARGV[0]); sub han{ return if $_[3] <= 0; han($_[0],$_[2],$_[1],$_[3]-1); print "Move disc $_[3] from $_[0] to $_[2]\n"; han($_[1],$_[0],$_[2],$_[3]-1); }