Have you tried if( $^O eq "MSWin32"){ open(INPUT, "../SampleConfig.xml") or die "Can't open .../SampleConfig.xml: $!"; } else { open(INPUT, "SampleConfig.xml") or die "Can't open SampleConfig.xml: $!"; }
Note forward slash... John -----Original Message----- From: K.Srinivas [mailto:[EMAIL PROTECTED]] Sent: 24 January 2002 08:11 To: [EMAIL PROTECTED] Subject: file handle not working in NT Hi, I have a piece of code in which I have to use some filehandles: if( $^O eq "MSWin32"){ open(INPUT, "..\SampleConfig.xml"); } else { open(INPUT, "SampleConfig.xml"); } open(OUTPUT, ">LoaderConfig.xml"); while(<INPUT>) {print "Hi hello\n"; if ($_ =~ /<UserName>/){print OUTPUT " <UserName>$db_user</UserName>\n"; } The problem I am facing in Nt machine with the script is that it does not take relative paths in the input file handle. ANy suggestions as to why this is so whereare in UNIX relative apths are getting accepted. K.Srinivas _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------Confidentiality--------------------------. This E-mail is confidential. It should not be read, copied, disclosed or used by any person other than the intended recipient. Unauthorised use, disclosure or copying by whatever medium is strictly prohibited and may be unlawful. If you have received this E-mail in error please contact the sender immediately and delete the E-mail from your system. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]