perl 判断文件是否存在并创建目录

just posted @ 2009年6月15日 22:36 in 脚本 , 18003 阅读

use   File::Path;
if(-e $x) { #abc.txt是否存在? 
# 存在操作 
} else { 
printf "文件不存在。\n";
 my   $path='F:/01/012/013;  
  eval{mkpath($path,0,0755)};  
  if($@)  
  {  
        warn("Make   path   [$path]   failed:\n$@");  
  }   

 

  • 无匹配
  • 无匹配
Hudson Creswell 说:
2018年7月15日 17:13

Users of files can easily locate and paste files on required paths with take professional advices from here. If you want to start business of superior essay writing company then hire qualified writers. Hope you will share more.

Cranberry 说:
2018年8月29日 16:59

This is a good post. This post gives truly quality information. I’m definitely going to look into it. Really very useful tips are provided here. Thank you so much. Keep up the good works <a href="https://www.naturalfoodseries.com/13-benefits-cranberries">Cranberry</a>

deannawilliam 说:
2018年9月24日 19:57

A record resembles a report, something that you have made and spared. This could be a PowerPoint introduction, Word record, photograph, and so on. An organizer is an area on your PC where you can store your records, pictures, and different things carefully. Eliza Coupe Future Man Jacket

Antoniokim 说:
2018年10月01日 00:00

I am extremely glad subsequent to perusing your articles and I am likewise exceptionally attached to your blogging style. Superb and marvelous employment to demonstrate these sorts of web journals. <a href="https://www.topcelebsjackets.com/product/taika-waititi-i-am-tired-varsity-unisex-jacket">Taika Waititi Varsity Jacket</a>

razaq 说:
2018年11月02日 19:07

It is interesting to read your blog post and I am going to share it with my friends.

Matthew 说:
2018年11月06日 09:11

Incredible article! I am picking up from it. It's captivating and a marvellous substance. That is some extraordinary points of view with respect to this subject. [url=https://academichelpers.co.uk/law-writing-services.php]Law Essay Help UK[/url]

USPS Tracking 说:
2018年11月17日 15:26

Wonderful site and I wanted to post a note to let you know, "Good job"! I’m glad I found this blog. Your blog site has presented me most of the strategies which I like. Thanks for sharing this.

happy wheels 说:
2018年12月31日 17:33

Thank you for sharing this data, it is very necessary for me.

Gerard Butler Leathe 说:
2019年3月22日 17:07

I truly delighted in perusing your article. Thanks for every other informative blog.<a href="https://www.celebsmoviejackets.com/den-of-thieves-gerard-butler-leather-jacket">Gerard Butler Leather Jacket</a>

Gerard Butler Leathe 说:
2019年3月22日 17:11

You have done a great job. The writing style which you have used in this article is very good and it made the article of better quality. Thank you so much for this informative post.<a href="https://www.celebsmoviejackets.com/den-of-thieves-gerard-butler-leather-jacket">Gerard Butler Leather Jacket</a>

xbox live membership 说:
2019年5月12日 21:52

By the use of this site you can get free xbox live membership no survey. it is simple to learn here about xbox live

sba loan 说:
2019年11月15日 22:26

Nobody likes to pay a big tax bill, but if it’s any consolation, your property taxes go to some pretty important things. This includes schools, roads, police forces, and other public safety initiatives, libraries, and local government salaries.

pixel car racer tips 说:
2020年4月27日 04:59

Pixel Car Race is Studio Furukawa’s best deal of a car racing game for both Android and iOS platforms. This game integrates an RPG sandbox experience, and hence, it might not be a perfect deal for someone who is looking for a quick and straightforward thrill. However, if you are someone who doesn’t really care about the old-school design as long as what you are getting is in-depth and involving, this will be a perfect choice for you.

wwe supercard cheats 说:
2020年5月06日 05:44

Mod.WWE game called SuperCard "2K Games, Inc." It is a game structured by. The game additionally is a sort of card fight game

wwe supercard legacy 说:
2020年7月13日 02:53

Beside getting paid to take reviews with Swagbucks, you can likewise win SBs by chasing for Swag Codes on the web. This resembles treasure chasing on the web for money.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter