#!/usr/bin/perl -w use 5.011; use utf8; use Config qw/%Config config_vars/; use lib "1.псы/template_stuff"; use utils1 qw/print_hash/; use Path::Tiny; my ( $archlibexp, $version ) = ( $Config{archlibexp}, $Config{version} ); my $arch_path = path($archlibexp)->parent; say "arch_path is $arch_path"; my $path_to_Config = path( $arch_path, $version, "Config.pm" ); my @lines = $path_to_Config->lines; # say "lines are @lines"; this works say "---------------"; for ( keys %Config ) { next if ($Config{$_} eq undef); if ( $Config{$_} =~ m%/usr/lib/x86_64-linux-gnu/perl% ) { say "$_ matched: $Config{$_}"; } }