in reply to Re:Fetching last part of url
in thread Fetching last part of url

#!perl use strict; use warnings; my $myfetch = 'http:\\myurlinfo\mypage.html'; $myfetch =~ m!([^/!]*$)! ? print $1 : print 'Whoops...'; __END__ Unmatched [ in regex; marked by <-- HERE in m/([ <-- HERE ^// at (eval + 1) line 7.
Probably you meant
#!perl use strict; use warnings; my $myfetch = 'http:\\myurlinfo\mypage.html'; $myfetch =~ m!([^\\]+)$! ? print $1 : print 'Whoops...'; __END__ mypage.html

Cheers,
CombatSquirrel.

Entropy is the tendency of everything going to hell.

Replies are listed 'Best First'.
Re^3: Fetching last part of url
by borisz (Canon) on Sep 09, 2004 at 17:16 UTC
    Oops, no I mean m!([^/]*$)! sorry.
    Boris