[sf-perl] Plucking from a string
yary
not.com at gmail.com
Fri May 23 07:50:48 PDT 2008
On Fri, May 23, 2008 at 7:47 AM, yary <not.com at gmail.com> wrote:
> On Fri, May 23, 2008 at 7:30 AM, Neil Heller <nheller at silcon.com> wrote:
..>> why is the d+ escaped?
>
> Try it without the backslash, and then try replacing the numbers in
> the input with the letter "d". It's an eye opener!
oops, what I should have said was
Try this
while ($theline =~ /(${TARGETSTR}d+)/gi) { print "$1\n"; }
once you remove the backslash, you have to add the brackets around the
variable to prevent the "d" from becoming part of the variable.
More information about the SanFrancisco-pm
mailing list