On Feb 24, 2004, at 1:19 PM, Anthony Vanelverdinghe wrote:

Thanks!
But the problem is the following:
the user has to enter an url and now i want to put "http://"; always in front (and show it on the screen) so that the user doesn't have to enter this everytime.

How about:


chomp( my $input = <> );
$input = 'http://' . $input unless m!^http://!;

Hope that helps.

James


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to