#!/usr/local/bin/perl open (MYFILE, 'shoplist.csv'); my $i=0; while () { chomp; if($i == 0) { $i++; next; } if (/\"(.*)\"/) { my ($first,$last)=split('\s',$_); print "$last $first\n"; } } close (MYFILE);