"Fossies" - the Fresh Open Source Software Archive

Member "whois/make_new_gtlds.pl" (27 Jul 2017, 201 Bytes) of package /linux/privat/whois_5.5.9.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "make_new_gtlds.pl" see the Fossies "Dox" file reference documentation.

    1 #!/usr/bin/perl
    2 
    3 use warnings;
    4 use strict;
    5 
    6 while (<>) {
    7     chomp;
    8     s/#.*$//;
    9     s/^\s+//; s/\s+$//;
   10     next if /^$/;
   11 
   12     die "format error: $_" if not /^(xn--[a-z0-9-]+|[a-z]+)$/;
   13 
   14     print qq|    "$_",\n|;
   15 }
   16