Skip to content

Instantly share code, notes, and snippets.

@dagolden
Created November 7, 2009 03:38
Show Gist options
  • Save dagolden/228507 to your computer and use it in GitHub Desktop.
Save dagolden/228507 to your computer and use it in GitHub Desktop.
sub _relayer {
my ($fh, $layers) = @_;
_debug("# requested layers (@{$layers}) to $fh\n");
my %seen;
my @unique = grep { $_ ne 'unix' and $_ ne 'perlio' and !$seen{$_}++ } @$layers;
_debug("# applying unique layers (@unique) to $fh\n");
binmode($fh, join(":", "", "raw", @unique));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment