IchNiSan --

Since this is a comma-separated file, why not simply use Perl's split function? It was built for situations like this.

@ary = split /,/, $string;
$whatitis = $ary[5];

if ($whatitis eq $whatyouexpect) {
blahblahblah
}

Using the split function with a regex pattern, you can make anything a delimiter. Let me know if you need some more information on this. Perl's kinda my thing.