From: Gajo Csaba <[EMAIL PROTECTED]>
> I'm trying to write a simple Hanoi tower program. Here is
> the procedure I've wrote (with line numbers):
>
> # hanoj (src,hlp,tgt,num)
> # src,tgt,hlp,n-1 src,hlp,tgt,1 hlp,src,tgt,n-1
>
> 3: sub hanoj
> 4: {
> 5: if ($_[3] <= 1)
> 6: {
> 7: print "From $_[0] we put on $_[2] with the help of $_
> [1]";
> 8: }
> 9: else
> 10: {
> 11: hanoj $_[0] $_[2] $_[1] ($_[3] - 1); print "From $_
> [0] we put on $_[1] with the help of $_[2]";
The syntax is wrong.
You can not leave out the commas between parameters !
Use
hanoj $_[0], $_[2], $_[1], ($_[3] - 1);
HTH, Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]