#!/usr/bin/perl -w use strict; use Data::Dumper; ... while ( my $line = ) { # No need to declare $line until here. my @AA = $line; # No need to declare @AA until here. # Might need to split the line, though ... print Dumper \@AA; # See what's really in that array. Note the backslash. ...