an easy one. how do I make my regexp test if a given string starts with a constant followed by a '/' (slash) and more characters, or no slash and no more characters.
I think this will make it clearer:
my $path = '/tmp/foo';
$ex1 = '\tmp\foo\bar'; # is OK
$ex2 = '\tmp\foo'; # is OK
$ex3 = '\tmp\foo\'; # is OK
$ex4 = '\tmp\food'; # is NOT OK