c:\@Work\Perl\monks>perl -le "use strict; use warnings; ;; my $columnID = 'XXX'; foreach ( my $columnID ) { while ( $columnID =~ /(^X)/ ) { my $ID = $1; print qq{$ID \n}; } } " Use of uninitialized value in pattern match (m//) at -e line 1.