- or download this
# 1A. not very anal, but more concise
for my $dir (glob "*") {
# for a brief moment, $dir might not hold a directory's name
next unless -d $dir;
...
}
- or download this
# 1B. more "correct", with additional related variable
for my $dir0 (glob "*") {
# a "0" suffix is my convention for variables that contain an unpr
+ocessed value
...
my $dir = $dir0;
...
}
- or download this
# 1C. more "correct", with additional variable and concept
for my $entry (glob "*") {
next unless -d $entry;
my $dir = $entry;
...
}
- or download this
# 2A. not very anal
sub load {
...
}
...
}
- or download this
# 2B.
sub load {
...
}
...
}