Help for this page

Select Code to Download


  1. or download this
    my ($dir) = m{/([^/]+)/[^/]*$};
    
  2. or download this
    my ($dir) = m{
                   /        # Preceeded by a slash.
    ...
                   [^/]*    # Preceeded by non-slashes, the file name.
                   $        # End of string.
                }x;