Hi all,

I have a hash and some prose text and want my perl to identify the keys of
the hash in this text and replace them with the corresponding values of
the keys.

I tried the following

foreach (keys %expan) {
  if ($sbl =~ m/$_/g) {
    $sbl =~ s/$_/$expan{$_}/g;
  }
}

but it doesn't seem to work properly. What am I doing wrong?

Thanks for the help,
best,
Petra

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to