[EMAIL PROTECTED] wrote: > Hi > > I tried the way in which you have suggested > ========================================== > #!/perl -w > use File::Basename; > > $FILENAME="\Developer\view_local\local_nt\FDAFDSAFDSASDFA\ASDFDAFSASDF\NewPr ocess_date_22-oct-2004.log"; > my $name = basename($FILENAME, '.log'); > print substr($name, 0, 7); > ====================================== > I am getting error > > Unrecognized escape \D passed through at ./a.pl line 4.
Use single quotes around the file name. See perldoc -q "DOS paths" -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>