in reply to First code - Factors
#!/usr/bin/perl use warnings; my ( $number ) = read_user_number(); my ( $factors ) = factor( $number ); output_number( $factors );
Yes, I've added a complication ... though we generate an array of factors, I return and pass a reference to the array, rather than the list of values.
As Occam said: Entia non sunt multiplicanda praeter necessitatem.
|
|---|