Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Run an applescript command that prompts for a URL.
Code:
osascript -e 'tell app "System Events" to choose URL'
It writes the URL (or nothing if cancelled) to its stdout stream.

AppleScript has many more graphical user interaction mechanisms, and all are easily invoked by the 'osascript' command. Use AppleScript Editor to open the scripting dictionary of "Standard Additions" and look under the User Interaction section.
 
Run an applescript command that prompts for a URL.
Code:
osascript -e 'tell app "System Events" to choose URL'
It writes the URL (or nothing if cancelled) to its stdout stream.

Since AppleScript has better Finder integration and UI components, it would seem to make sense to wrap the perl script with the AppleScript rather than vice-versa, right?

Note too that you can simply drag & drop or copy & paste URLs from Safari in many cases which comes in handy if you want to pass a URL to curl or wget or the like...

B
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.