ファイルテストを積み重ねる
これも 5.10 から。
if (-r $file and -w _) { # read and write
とやっていた(_ は読み込み済みのstat を参照)ところを・・・
if (-w -r $file) { # read and write
と書けるようになる。評価はファイル名に近い順に行われる。おーこれは地味に便利。
これも 5.10 から。
if (-r $file and -w _) { # read and write
とやっていた(_ は読み込み済みのstat を参照)ところを・・・
if (-w -r $file) { # read and write
と書けるようになる。評価はファイル名に近い順に行われる。おーこれは地味に便利。