[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] match "/" at end of string ???



here's an easy one...


what is the best way to to check if string has  a "/" at the end?

$slashdirpath = "images/porsches/my911s/";

if ($slashdirpath =~ /$\//) {
   print "slash path does have a slash after it\n";
} else {
    print "slash path does NOT have a slash after it\n";
}

this does not work...please help!!!

thank you 
   dave