#!perl use strict; use warnings; use Perl6::Say; my $PRIV_IP_RE = qr{^https?:// \b(?: 10\.(?:\d\d?|1\d\d|2(?:[0-4]\d|5[0-5]))| # class A 172\.(?:1[6-9]|2\d|3[01])| # class B 192\.168 # class C ) \.(?:\d\d?|1\d\d|2(?:[0-4]\d|5[0-5])) \.(?:\d\d?|1\d\d|2(?:[0-4]\d|5[0-5]))\b }xi; for my $url (qw(http://10.10.2.60/ http://www.google.com/)) { say "$url IS " . ($url =~ $PRIV_IP_RE ? "NOT BOOKMARKABLE" :