Hi, How about this:
use strict; use warnings; my $str = "((((9,(6,8)),((4,((3,2),1)),5)),(12,11)),(13,(7,10)))"; my @data = ("dumy", "A","B","C","D","E","F","G","H","I","J","K","L","M"); $str =~ s/(\d+)/$data[$1]/g; print $str; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>