1. specify the file/dir path in perl.
*.pl script is automatically identified to interpreter with perl program.
so need not to give the line like in linux/unix. (#!/bin/perl)
the path in windows usually use the "c:\dir\dir". but in perl in windows os , if we want specify one file/dir , we should replace the "\" with the "/".
example:
if (open(FILE,"c:/test.xml") ) ##here we must use the "/" , not "\".
{
print "open ok\n";
close(FILE);
}
else
{ print ("could not open file");}
阅读(784) | 评论(0) | 转发(0) |