# this will expand the variables print "$labels[$counter]"; #this will print the literal variables, no expansion: print '$labels[$counter]';