Douglas Wilson wrote:
>
> On 05/16/00, "Roee Rubin <[EMAIL PROTECTED]>" wrote:
> > $val=~s|\\|\/|gi;
> > if (-e "$val") {
>
> There's no need for quotes around "$val", and
> no need to escape the forward slash. I don't
> think there's any need to substitute backslashes
> for forward slashes anyway. And really no need to
> do case insensitive matching when theres no alpha
> characters.
You may also want to check for trailing whitespace:
$val =~ s/\s+$//g;
Ian
--
99 little bugs in the code, 99 bugs in the code.
Fix one bug, compile again, 100 little bugs in the code.
100 little bugs in the code, 100 bugs in the code.
Fix one bug, compile again, 101 little bugs in the code...
---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]