in reply to Re: Breaking file path into segments
in thread Breaking file path into segments

File::Spec is a standard module and comes with Perl. For a list of standard modules, see perldoc perlmodlib

If your code is going to be run on a different machine than your development one, using standard modules means you don't have to distribute and maintain additional code (the modules).

Replies are listed 'Best First'.
Re^3: Breaking file path into segments
by choroba (Cardinal) on Apr 15, 2019 at 14:48 UTC
    > you don't have to distribute and maintain additional code

    Unless you work on a RedHat based Linux distribution where you need to install the perl-PathTools package. Installing perl-Path-Tiny is comparably complex.

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]