Help for this page

Select Code to Download


  1. or download this
    my $s = 'Hello [2][1]';
    my @a = ('x','y','z');
    $s =~ s/\[(\d{1,2})\]/$a[$1]/g;
    print $s;