in reply to Re:Fetching last part of url
in thread Fetching last part of url
Probably you meant#!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.
#!perl use strict; use warnings; my $myfetch = 'http:\\myurlinfo\mypage.html'; $myfetch =~ m!([^\\]+)$! ? print $1 : print 'Whoops...'; __END__ mypage.html
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Fetching last part of url
by borisz (Canon) on Sep 09, 2004 at 17:16 UTC |