Try this:

        $dir =~ s/\//\\/g;




"Barlow, Neil" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]

09/10/2002 09:05 AM

       
        To:        [EMAIL PROTECTED]
        cc:        
        Subject:        Regualr Expression



Hi all,

I am dealing with directories and I read somewhere that it is best to use /
rather than \ when dealing with directories. In order to cover my back - I
am attempting to parse the string and replace any \ with / using the
following:

print "Please enter directory to search: ";                 # directory prompt
chomp($dir = <STDIN>);

$dir =~ s/\///g;

But the regular expression is not replacing the slashes - can anyone assist
on this

I really appreciate your input
Regards,
Neil Barlow
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Reply via email to