Help for this page

Select Code to Download


  1. or download this
    m{$location/?$}
    
  2. or download this
    my $file = 'some_filename';
    my $location = 'some_filename/';
    ...
    $location =~ s{/$}{/?};  # If a trailing / is found, append a ? to it.
    
    if( $file ~= m{$location$} ) { # Do your stuff }