in reply to Re: Buffering and output help needed
in thread Buffering and output help needed
Am I better returning values from incStart() pushing them into an array and printing the array?,
And always seperating the print functions from the calculation functions.
$| = 1; my $Qcount = 10; my $Qstart = 0; my $Qint = 3; my @StorageArray; sub incStart { for ( $x = $_[0] ; $x < $_[1] ; $x++ ) { if ( ( $x % $_[2] ) == 0 ) { # print $x . "\n"; # push (@StorageArray, $x); return $x; } } } print "test "; print incStart( $Qstart, $Qcount, $Qint ) . "\n";
This doesnt work either,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Buffering and output help needed
by Joost (Canon) on Oct 07, 2006 at 13:10 UTC | |
by richill (Monk) on Oct 07, 2006 at 13:42 UTC |