#!/usr/bin/perl use strict; use warnings; my @data_array; while(<>){ #chomp; @_=split(/,/,$_); push @data_array, \@_; } my $data = \@data_array;