in reply to regular expression (search and destroy)

Greetings all,
Let me preface this post with the fact that I am only answering the question posted... Namely the ' All i need to do is take out the extra "," comma that is appearing in the the field' part. The following code is not as universal or portable as most code should be, but this will work give the example line of input from the original post.
That being said... Here is what I would suggest.
#!/usr/bin/perl -w use strict;#Always ###the sample line of input my $line = qq*121212, "Simpson, Bart", springfield*; ###capture all quoted strings and place them in @elms my @elms = $line =~ /("[^"]*")/g; ###got through the captures you found in the string $line; for(@elms){ ###make two copies for later use my $original_elm = $_; my $new_elm = $original_elm; ###clean up time $new_elm =~ s/[,"]//g; ###replace the old with the new element. $line =~ s/\Q$original_elm\E/$new_elm/; } my @elements = split(/,/,$line); print "@elements"."\n"; exit; ___OUTPUT___ 121212 Simpson Bart springfield
Of course this logic will need to be grouped in such a way as to deal with each line of input.
Not all that elegant but you get the general idea.
Hope that helps.
-injunjoel