Zhao, Bingfeng wrote:
Hi list,
I'm in trouble and hope who can work me out.
I want to so some replacements, so I want to keep all replacement
policies in a hash so that I can use them in a foreach loop, such as:
my %policies = (
"abc" => "def",
"jfk\s+" => "jfk ",
"(\d+)u
Zhao, Bingfeng wrote:
Hi list,
Hello,
I'm in trouble and hope who can work me out.
I want to so some replacements, so I want to keep all replacement
policies in a hash so that I can use them in a foreach loop, such as:
my %policies = (
"abc" => "def",
"jfk\s+" => "jfk ",
Thanks, Jeff. But for qr/(\d+)uu/ and 'uu\1' on '22uu', I got 'uu\1' instead of
'uu22'.
-Original Message-
From: Jeff Pang [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 22, 2008 5:02 PM
To: beginners-list
Subject: Re: list or hash of re
-Original Message-
>From: "Zhao, Bingfeng" <[EMAIL PROTECTED]>
>Sent: Jan 22, 2008 4:53 PM
>To: beginners@perl.org
>Subject: list or hash of replacement regex
>
>But perl complains, so I update it as:
>my %policies = (
> qr/abc/ => "d
Hi list,
I'm in trouble and hope who can work me out.
I want to so some replacements, so I want to keep all replacement
policies in a hash so that I can use them in a foreach loop, such as:
my %policies = (
"abc" => "def",
"jfk\s+" => "jfk ",
"(\d+)uu" => "uu\1"
#... many p