Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Convert relative to absolute URL given a base URL, without modules

by Aristotle (Chancellor)
on Jan 17, 2006 at 06:07 UTC ( [id://523679]=CUFP: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub abs_url {
        my ( $relative, $base ) = @_;
    ...
    
        return "http://$abs_url";
    }
    
  2. or download this
    use Test::More;
    my @test = qw(
    ...
    );
    plan tests => @test / 3;
    do { is abs_url( $test[0], $test[1] ), $test[2]; splice @test, 0, 3 } 
    +while @test;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-25 13:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found