my ($innerstr) = ($str =~ /\[(.*?)\]/);
this assumes you only want the first occurance and that there arent any stray brackets around.
The ? after the .* tells it to do a minimal match so that is wont greedily grab to much if there is an extra close bracket after the part you want to match.
-pete
Entropy is not what is used to be.