Suppose I have the following in a text file "fbb_test":
Now suppose I have the following script:
my $file = "/tmp/fbb_test";
open(FILE, $file) || die("ERROR: Unable to open $file for read, exitin
if ($_ =~ /\/(.+?)$/)
The script is returning "captured foo/bar/baz". Given that I specified the non-greedy operator (?), I would have expected the result to be "baz", as the non-greedy operator would have matched as few characters as possible between a forward slash and the end of the line. What am I missing here?