in reply to Simple link extraction tool
Also if user enters URI without 'http', add it:my $url = shift; if (!$url) { print "Usage: $0 URI\n"; exit 1; }
Checking and validating user input is (for me) a must-have task, even for simple and small program like this.if ($url !~ m(^http://)i) { $url = 'http://' . $url; }
|
|---|