Hi "ubuntu",

On Monday 05 Apr 2010 18:55:39 ubuntu wrote:
> Hi
> 
> I am new in perl script. 

Welcome to Perl! Please see http://perl-begin.org/ for links to beginners' 
resources.

Just note that you can do programming as well as scripting in Perl. See:

* http://xoa.petdance.com/Stop_saying_%22script%22

* http://www.perl.com/pub/a/2007/12/06/soto-11.html - "Programming is Hard. 
Let's Go Scripting" - by Larry Wall.

> Does anyone know how to implement this puzzle
> in perl?
> 
> [ 0 ]                        =  0
> [ 1 ]                        =  1
> [ 0, 1 ]                     =  1
> [ 1, 1 ]                     =  2
> [ 1, [ 1, 2 ] ]              = -2
> [ 1, 2, [ 8 ] ]              = -5
> [ 1, [ 2 ], [ 3 ] ]          = -4
> [ 9, [ 3, 4, [ [ 2 ] ] ] ]   =  0
> ...
> 

I know how to implement arrays that contain array references (in case that's 
what you want) but I don't understand the logic behind this puzzle. Please 
detail its inner logic.

Regards,

        Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Funny Anti-Terrorism Story - http://shlom.in/enemy

Deletionists delete Wikipedia articles that they consider lame.
Chuck Norris deletes deletionists whom he considers lame.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to