"Fossies" - the Fresh Open Source Software Archive

Member "whois/make_nic_handles.pl" (27 Jul 2017, 225 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_nic_handles.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
   13         (my ($a, $b) = /^(-\w+)\s+([\w\d\.:-]+)$/);
   14 
   15     print qq|    "$a",\t"$b",\n|;
   16 }
   17