#!/usr/bin/perl use warnings; use strict; my $in_file="\\in_dile\.txt"; my $count_runs=0; while (1) { $count_runs++; read_file(); print "run $count_runs\n"; <>; } sub read_file { my @data; open MYFILE ,$in_file or die "Could not open file to read:$in_file\n"; while() { my $temp=$_; chomp $temp; my @array=split("\t",$temp); push(@data,[@array]); } close MYFILE; }