{ package PathCat; use warnings; use strict; use 5.12.0; our @ISA=qw(Exporter); our @EXPORT=qw{pathcat Set_sep($) Fs_path_sep() pathcat(@)}; use Exporter; our $_sep = '/'; sub Set_sep ($) { $_sep = $_[0]; } sub Fs_path_sep () { $_sep } sub _fs_path_sep() { $_sep } sub pathcat(@) { my $lval; shift while (! defined $_[0] ) and @_>=1; defined $_[0] ? ( @_ >= 1 ? $_[0] . ( ( length ($lval=&path_cat($_[1], @_[2 .. $#_ ])) and length $_[0] and $_[0] ne _fs_path_sep ) ? _fs_path_sep : '' ) . $lval : $_[0] ) : $_[1] // '' } sub path_cat(@) { goto &pathcat } #old name compat 1;};