Chinaunix首页 | 论坛 | 博客
  • 博客访问: 578391
  • 博文数量: 158
  • 博客积分: 2696
  • 博客等级: 少校
  • 技术积分: 1668
  • 用 户 组: 普通用户
  • 注册时间: 2007-06-10 00:49
个人简介

life?is?short?,?play?more!

文章分类

全部博文(158)

文章存档

2021年(1)

2013年(10)

2012年(4)

2011年(11)

2010年(27)

2009年(28)

2008年(52)

2007年(25)

我的朋友

分类:

2009-09-17 23:13:52

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");}
 
阅读(740) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~