>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
the third slash is ending the regex. $dir=~s!\!/!g; #should work better, no ambiguity with slashes _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs