Skip to content

Instantly share code, notes, and snippets.

@ytnobody
Created March 31, 2011 01:51
Show Gist options
  • Save ytnobody/895681 to your computer and use it in GitHub Desktop.
Save ytnobody/895681 to your computer and use it in GitHub Desktop.
Example for using "I18N::LangTags"
#!/usr/bin/env perl
$| = 1;
use warnings;
use strict;
use Data::Dumper;
use I18N::LangTags qw/ :ALL /;
use I18N::LangTags::List;
my $line;
while ( $line = <STDIN> ) {
chomp $line;
print Dumper( map { $_ if I18N::LangTags::List::is_decent( $_ ) } ( extract_language_tags( $line ) ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment