in reply to Regex failing

No-no-no, why do you think it should not fail?
And hint: you can use different separators instead of slashes - s/find/replace/ can be s|find|replace, for example.

Replies are listed 'Best First'.
Re^2: Regex failing
by iphone (Beadle) on Feb 03, 2011 at 10:21 UTC
    Where is my understanding wrong?
    (my $file_name) = $line =~ / \/ #match a front slash "/" [^\/]#dont match any more frontslashes (.*)#match everything after / and save \s-\s#match a " - " /;
      Hmmm... semicolon? previously you said it begins with semicolon:
      (my $file_name) = $line =~ /;\/[^\/](.*)\s-\s/;