replace words in string with hash values
From: wana (ioneabu_at_yahoo.com)
Date: 11/29/04
- Previous message: Alan J. Flavell: "Re: Minimize black screen"
- Next in thread: Gunnar Hjalmarsson: "Re: replace words in string with hash values"
- Reply: Gunnar Hjalmarsson: "Re: replace words in string with hash values"
- Reply: Paul Lalli: "Re: replace words in string with hash values"
- Reply: Michele Dondi: "Re: replace words in string with hash values"
- Reply: Bob Walton: "Re: replace words in string with hash values"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Nov 2004 12:23:16 -0800
foreach (keys %h)
{
$a =~ s/\b$_\b/$h{$_}/g;
}
I want to replace matches in string to hash key with hash value. I am
replacing acronyms with phrases where acronym is hash key. Is there a
better or different way?
thanks!
wana (on pda)
- Previous message: Alan J. Flavell: "Re: Minimize black screen"
- Next in thread: Gunnar Hjalmarsson: "Re: replace words in string with hash values"
- Reply: Gunnar Hjalmarsson: "Re: replace words in string with hash values"
- Reply: Paul Lalli: "Re: replace words in string with hash values"
- Reply: Michele Dondi: "Re: replace words in string with hash values"
- Reply: Bob Walton: "Re: replace words in string with hash values"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|