On 3/10/06, tom arnall <[EMAIL PROTECTED]> wrote:
> the following script is intended to uppercase every character preceded by [?.]
> and one or two spaces:
>
> ($f,$g)=/([?.] {1,2})([a-z])/s;
> $h = uc $g;
> s/$f$g/$f$h/s;
>
> in the third line however perl interprets the [.?] in $f as a metacharac
tom arnall wrote:
> the following script is intended to uppercase every character preceded by
> [?.]
> and one or two spaces:
>
> ($f,$g)=/([?.] {1,2})([a-z])/s;
> $h = uc $g;
> s/$f$g/$f$h/s;
>
> in the third line however perl interprets the [.?] in $f as a metacharacter.
> is there any way
Tom Phoenix wrote:
On 3/10/06, tom arnall <[EMAIL PROTECTED]> wrote:
is there any way to get perl to interpret the contents of $f as a literal?
I think you're looking for the quotemeta() function. Hope this helps!
--Tom Phoenix
Stonehenge Perl Training
You can also use the \Q meta-charact
On 3/10/06, tom arnall <[EMAIL PROTECTED]> wrote:
> is there any way to get perl to interpret the contents of $f as a literal?
I think you're looking for the quotemeta() function. Hope this helps!
--Tom Phoenix
Stonehenge Perl Training
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
the following script is intended to uppercase every character preceded by [?.]
and one or two spaces:
($f,$g)=/([?.] {1,2})([a-z])/s;
$h = uc $g;
s/$f$g/$f$h/s;
in the third line however perl interprets the [.?] in $f as a metacharacter.
is there any way to get perl to interpret the contents o