Logo

Programming-Idioms

History of Idiom 212 > diff from v4 to v5

Edit summary for version 5 by daxim:
New Perl implementation by user [daxim]

Version 4

2019-10-21, 20:32:36

Version 5

2019-10-22, 11:14:47

Idiom #212 Check if folder exists

Set boolean b to true if path exists on the filesystem and is a directory; false otherwise.

Idiom #212 Check if folder exists

Set boolean b to true if path exists on the filesystem and is a directory; false otherwise.

Extra Keywords
test whether existence
Extra Keywords
test whether existence
Imports
use 5.010;
Code
my $b = -e -d $path;
Comments bubble
http://p3rl.org/perl5100delta#Stacked-filetest-operators
Doc URL
http://p3rl.org/-X