2006年02月08日

ファイルテスト演算子(e)

ファイルテスト演算子eに関して説明します。
次のファイルをsample147.plという名前で保存します。
if (-e "text147.txt") {
	print "存在します。\n";
} else {
	print "存在しません。\n";
}
実行結果は、次の様になります。
> perl sample147.pl
存在しません。
> echo test > text147.txt
> perl sample147.pl
存在します。
 

Trackback on "ファイルテスト演算子(e)"

以下2件のトラックバックはこのページのエントリー"ファイルテスト演算子(e)"を参照しています。

このエントリーのトラックバックURL: 

» Hold Em Tips

  • 2006年09月02日 13:12
  • from Hold Em Tips

Texas holdem onli... [続きを読む]

» online slot game

  • 2006年10月13日 18:05
  • from online slot game

たまに来ますのでよろしくお願いします。 [続きを読む]

Comment on "ファイルテスト演算子(e)"

"ファイルテスト演算子(e)"へのコメントはまだありません。