in reply to Variable into list

As was suggested by Corion at the time, you are probably better off with a hash for this.

Here is a self-contained example that demonstrates:

#!/usr/bin/perl -l use strict; use warnings; my $string = 'P,F,'; my %letters = map { $_ => 1 } split /,/, $string; for (qw(P F T)) { print "$_ is ", $letters{$_} ? "set" : "not set"; }
Which prints:
P is set F is set T is not set

Cheers,
Darren :)