On Sun, 28 Aug 2005 12:05:07 -0700, you wrote:

>Newbie to RegEx so though I would start with something really easy. My big 
>mistake
>
> 
>
>Problem
>
>If the string does not contain a trailing \ then add one.

$string .= "\\" unless $string =~ /\\$/;
or, if you prefer,
$string .= "\\" if $string !~ /\\$/;
-- 
Eric Amick
Columbia, MD

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to