Other thing, if you want to process the lines, don't cat all the file inside a @array, to after this process them! Is better to read and process, this is faster and use less memory: open (FLHD,"$0") ; while (my $line = ) { my ($x , $y , $z) = split("::" , $line) ; }