Help for this page

Select Code to Download


  1. or download this
    function fileExtension($file) {
            $pos = strrpos($file,".");
    ...
                    return $ext;
            }
    }
    
  2. or download this
    sub fileExtension {
            my $file = shift;
    ...
                    return $ext;
            }
    }
    
  3. or download this
    sub extension {
        my $path = shift;
    ...
        $ext =~ s/^\.//;
        return $ext;
    }