Hi Vishal,
I am not sure what exactly is your task but given I understand you right you cold add a global e.g. rand_31 with:
my @array = ( 1 .. 31 );
use List::Util qw(shuffle);
@array = shuffle(@array);
return @array;
}
and in the templates call the sub and loop through it.
Not 100% sure if you can return an array to the templats or if you have to
my @array = ( 1 .. 31 );
use List::Util qw(shuffle);
@array = shuffle(@array);
return \@array;
}
Regards
Niko
I am not sure what exactly is your task but given I understand you right you cold add a global e.g. rand_31 with:
Code:
sub { my @array = ( 1 .. 31 );
use List::Util qw(shuffle);
@array = shuffle(@array);
return @array;
}
and in the templates call the sub and loop through it.
Not 100% sure if you can return an array to the templats or if you have to
Code:
sub { my @array = ( 1 .. 31 );
use List::Util qw(shuffle);
@array = shuffle(@array);
return \@array;
}
Regards
Niko