open my $in, "<:$ENV{LAYER}", $infile or die $!; open my $out, ">:$ENV{LAYER}", $outfile or die $!; # ...