On Jun 10, David T-G said:
>% $_ =~ s/##UF##/$MSG/g;
>
>Looks fine to me. The only thing that comes to mind is that your $MSG
>might have some expr-matching characters which bomb somehow.
The right-hand side of the s/// can't do anything to blow up the regex.
>Meanwhile, I have to wonder why you're modifying $_ in the loop. I
>haven't tested this (and so I know I'm gonna get burned), but why not
>just
>
> while (<PAGIN>)
> {
> print PAGOUT s/##UF##/$MSG/g;
> }
>
>instead?
Because s/// doesn't return $_, it returns the number of times it did a
substitution. "I haven't tested this" -- famous last words, or at least
they should be. ;)
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
[ I'm looking for programming work. If you like my work, let me know. ]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]