$ cat 4.archive.pl #!/usr/bin/perl -w use 5.011; use lib "template_stuff"; use utils2; use Path::Tiny; use utf8; use open qw/:std :utf8/; use Data::Dumper; # initializations that must precede main data structure my $fspecfile = File::Spec->rel2abs(__FILE__); ### does this^^^ have a Path::Tiny equivalent? ## turning things to Path::Tiny my $path1 = Path::Tiny->cwd; say "path1 is $path1"; my $title = $path1->basename; say "base is $title"; # script parameters my %vars = ( init_dir => $path1, title => $title, script_file => $fspecfile, ); # caller my $rvars = \%vars; my $return1 = archive1( $rvars ); # returns created dir chdir( $return1 ); system("pwd"); system("find ."); __END__ $