in reply to Re^2: Trying to make the code more clear and clean
in thread Trying to make the code more clear and clean
Personally I find that
open(my $fh, '<', "$file_path") or return 0;
is much less readable than
open(my $fh, '<', $file_path) or return 0;
With the former one is forced to ponder why the author has enclosed nothing more than a single scalar in double-quotes. Perhaps $file_path isn't really a scalar but is instead some path object requiring stringification. So then we have to go looking for the declaration of $file_path and assignments to it, etc. ... only to find that it's a just a plain string after all and the double-quotes are superfluous.
Editing is an art for sure but cutting for clarity is one of the easiest tasks.
|
|---|