#!/usr/bin/perl -w use strict; my @number = qw(2 3 4 5); # Get those values to index array element @MDarray[2][3][4][5] = #Do something;