John SJ Anderson <j...@genehack.org> writes: >> But this one in its place does not work: >> if ($link =~ m/\/([^/]*)$/) { # Oddly this does not work > > You still need to escape the `/` inside the character class. > > This works in my testing: `m/\/([^\/]*)$/`. > > IMO this is a case where an alternative delimiter for `m//` — such as the `#` > in your working example — is a better approach.
IIRC it´s said in best practises or so that brackets ({, }) should be used for an alternative delimiter and that they should probably be the only substitute to use. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/