Raheel Hassan wrote:
Thanks Arun and Rob,

For example if this is the url then ,
https://localhost/Iv2/cbox/cbox-gui.pl?action=status

my ($myself) = split(/\?/,$q->self_url);
#$myself = https://localhost/Iv2/cbox-gui.pl

my @base_url = split(/\//, $myself);
# @base_url = {localhost, Iv2, cbox-gui.pl}

Incorrect:

# @base_url = ('https:', '', 'localhost', 'Iv2', 'cbox-gui.pl')


my $base_url = $base_url[0]."//".$base_url[2]."/";
# $base_url = localhost//cbox-gui.pl/

Incorrect:

# $base_url = 'https://localhost/'


my $cbox_url = $base_url."Iv2/";
#$cbox_url = localhost//cbox-gui.pl/Iv2/

Incorrect:

#$cbox_url = 'https://localhost/Iv2/'




John
--
The programmer is fighting against the two most
destructive forces in the universe: entropy and
human stupidity.               -- Damian Conway

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to