> >Problem
> >
> >If the string does not contain a trailing \ then add one.
> 
> $string .= "\\" unless $string =~ /\\$/;
> or, if you prefer,
> $string .= "\\" if $string !~ /\\$/;

Or

$string =~ s{\\?$}{\\};

-- 
Mark Thomas 
Internet Systems Architect
_______________________________________
BAE SYSTEMS Information Technology 
2525 Network Place
Herndon, VA  20171  USA 

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to