http://qs1969.pair.com?node_id=869427


in reply to Getting only the link in a line

See Regexp::Common::URI::http

#!/usr/bin/perl use strict; use warnings; use Regexp::Common qw /URI/; while(<DATA>){ chomp; /$RE{URI}{HTTP}{-keep}/ and print "Contains an HTTP URI.\nHost=$3\n"; } __DATA__ http://192.168.1.10/index.html http://www.delicious.com/search?p=perl&chk=&context=main|&fr=del_icio_ +us&lc=

Output:
Contains an HTTP URI.
Host=192.168.1.10
Contains an HTTP URI.
Host=www.delicious.com


hth,
PooLpi

'Ebry haffa hoe hab im tik a bush'. Jamaican proverb