On Mon, 2007-01-08 at 20:04 +1100, Roman wrote: > Yes I should have used / instead of \ it would have worked on both. I also > should have changed the path > > 'C:\work\_RHWork\projects\perl-beginers\directory-read\files-dir'; > > To > 'C:/work/_RHWork/projects/perl-beginers/directory-read/files-dir'; > > That way you can should be able to run it on windows and linux.. > > Most of my development it on windows. So I don't think too much about unix > compability. > > Cheers Roman > > > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Monday, 8 January 2007 5:16 PM > To: Roman > Cc: beginners@perl.org > Subject: RE: perl script instead of grep > > > > > Hope fully this helps > > > > ### Script start > > > > use strict; > > > ... > > Hello, > > problem solved. > The script was writeen for windows with \\ in the path. It should run > on a linux box. I replaced the \\ with // and now it works. > > Is ti possible, for compatibility, to use // in windows too ? > > Thanks > Andreas
you only need a single /, \\ is \ after substitution. For cygwin certainly works that way. For normal DOS or windows / is magically translated. I am not sure it works for UNC's correctly though \\server\share\directory/xxx.txt works for sure though. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/