#!/usr/bin/perl $filename="p1"; #input file into array open(plate_file,$filename.".csv") or die "Can't open: $!"; $firstline=; #remove first line while() { chomp(); #remove newlines??? @row=split(/,/); #split row into array elements shift(@row); #remove first column push(@data,@row); #append current row to data array } close(plate_file); #create file structure mkdir($filename, 0777) || print "$!\n"; foreach(@data){ if(-d "$filename/$_"){ } else { mkdir("$filename/$_",0777) || print "$!\n"; } } #### while() { if(/(.*)\n/){ @row=split(/,/,$1); shift(@row); push(@data,@row); } }