in reply to How to save the output result in file

my@array_g = @array[25..16];

Please be aware if you are not already that  @array[25..16] produces an empty list and not, as you might have been expecting, a reversed slice of the original array. See the "Range Operators" section in perlop.