Re: is there a way to shorten these lines?

2017-11-27 Thread Luca Ferrari
On Mon, Nov 27, 2017 at 11:57 AM, Duncan Ferguson wrote: > Are you after "dirname", past of File::Basename? > http://perldoc.perl.org/File/Basename.html Ups...I was sticking with File::Spec! Thanks, that was I was looking for. Luca -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org Fo

RE: is there a way to shorten these lines?

2017-11-27 Thread Duncan Ferguson
Are you after "dirname", past of File::Basename? http://perldoc.perl.org/File/Basename.html $ perl -MFile::Basename -le 'print dirname(shift)' /path/to/some/directory/somewhere /path/to/some/directory Duncs -Original Message- From: fluca1...@gmail.com [mailto:fluca1...@gmail.com] O

Re: is there a way to shorten these lines?

2017-11-27 Thread Илья Рассадин
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 fig

is there a way to shorten these lines?

2017-11-27 Thread 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( @remot