Hi!
I see no reason to squash these lines of code into one. It works, it
shows your idea clearly.
All technics you can use to reduce this code will make this code less readable.
If you need it for production, I don't recommend it.
27.11.2017 12:54, Luca Ferrari пишет:
Hi all,
I cannot figure how but I think it is possible to reduce the following
to a nested single stamente:
my @remote_dirs = File::Spec->splitdir( $remote_path );
pop @remote_dirs;
$remote_path = File::Spec->catdir( @remote_dirs );
The idea is to remove from a path the last directory and rebuild the
path itself. Since this is executed due to a particular condition, I
would like to express it as a postponed if but I cannot find a short
way of doing it. Any idea?
Thanks,
Luca
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/