Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Getting only the link in a line

by iphone (Beadle)
on Nov 03, 2010 at 22:39 UTC ( [id://869342]=note: print w/replies, xml ) Need Help??


in reply to Re: Getting only the link in a line
in thread Getting only the link in a line

there seems to be some syntax error with the code you provided.I used the below code it worked,but now the problem is there is "."(dot) at the end of somelinks .I need to remove that.How do I do that?

($resolution_link) = $match =~ /(https?:\/\/(\S+))/;

Replies are listed 'Best First'.
Re^3: Getting only the link in a line
by Utilitarian (Vicar) on Nov 03, 2010 at 22:42 UTC
    That's why I said there were better solutions available ;), this was a quick hack to solve a specific case.

    One solution would be to remove punctuation at the end of the link in a second pass

    print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."
    A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://869342]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-20 16:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found