in reply to Global Symbol issue while using arrays

You never declared @wt.

#!/usr/bin/perl -w use 5.10.1; use strict; use warnings; my @wt = (1,2,3,4); print $wt[2];

Passing -Mdiagnostics to Perl will explain many of these.