http://www.perlmonks.org?node_id=969082

sweepy838 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, very much a pathetic question but i have a string containing special characters, letters and numbers.
$str = 'xxia5ujcjzbgdiaknqybacf1uhm?6nd9q0icmjloztk?k@i3d@6b'; my @numbers = $str =~ /(\d+)/g; #grab all numbers my @chars=split(//,$str); #convert to char array
now sinse i have all the numbers, i'd like to loop through the char array and print out only the non numberic characters. using replace would do the job but that seems like going the long way ?