in reply to [untitled node, ID 168354]
Maybe you're looking for somthing in the neighborhood ofif ($form{webcam} =~ (/http/ OR /www/) AND (/jpg/ OR /gif/))
But no, that will not ensure that you have an internet address of an image. The only way to ensure that is to actually get what's in that address and check that it's an image. You can guess, but you may be too surprised.if ($form{webcam} =~ /^(http|www).*(jpg|gif)$/){
PS. If you're looking for links in a file, you might want to consider URI::Find which simplifies the task down to writing a callback function.
Hope this helps,,,
|
|---|