in reply to open file and write the content into another file

In addition to what ambrus said, I suggest that you use only forward slashes in the string passed to glob. From File::Glob:

Win32 users should use the real slash. If you really want to use backslashes, consider using Sarathy's File::DosGlob, which comes with the standard Perl distribution.

-- 
Ronald Fischer <ynnor@mm.st>