in reply to Cube/digit script.

Hi Andrew,
I have rewritten your script(same as yours),
I am not sure whether my output is correct or not,
I just tried to get the output Result, What you are trying now
I hope this might help
use strict; use warnings; my ($i,$j,$l,$s); my (@num,@numbers); for $i(100..999) { undef(@num); @num=split(//, $i); foreach $j(@num){ $j=$j**3;} $s=0; for $l(@num) {$s = $s + $l;} if( $s == "$i") {push (@numbers, $i);} } print @numbers; #output is 153370371407

Thanks,
perlsen
UPDATE:
This script was written by me to produce the output for your program only.
I am not clearly go through your script.
Any way, This is waste of my precious time.
and Thanks for some fellow monks good response.