in reply to Fetching last part of url

Anonymous Monk,
#!/usr/bin/perl use strict; use warnings; use URI; my $uri = URI->new( 'http://www.foo.com/asdf/blah/bar.html' ); print +($uri->path_segments)[-1];

Cheers - L~R