{"success":true,"data":{"ext":"pm","name":"PM","description":"PM (Perl module) is a plain-text source file format used by Perl, the programming language originally created by Larry Wall and now maintained by the Perl community. It is used to define reusable modules, libraries, and package code for scripts and applications, particularly in Unix and server-side environments. As executable text, it is generally safe to store, but untrusted modules may contain code that runs when loaded, so provenance should be verified.","mime":["text/x-perl"],"risk_level":"Safe","signatures":[{"hex":"65 76 61 6C 20 22 65 78 65 63 20 2F 75 73 72 2F 6C 6F 63 61 6C 2F 62 69 6E 2F 70 65 72 6C","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"23 21 2F 62 69 6E 2F 70 65 72 6C","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"23 21 2F 62 69 6E 2F 65 6E 76 20 70 65 72 6C","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"23 21 2F 75 73 72 2F 62 69 6E 2F 70 65 72 6C","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"23 21 2F 75 73 72 2F 6C 6F 63 61 6C 2F 62 69 6E 2F 70 65 72 6C","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]}],"related":["pl","al","awk","perl","php","py"],"usage":{"python":"def is_pm(file_path: str) -> bool:\n    \"\"\"Check if file is a valid PM by magic bytes.\"\"\"\n    signature = bytes([0x65, 0x76, 0x61, 0x6C, 0x20, 0x22, 0x65, 0x78, 0x65, 0x63, 0x20, 0x2F, 0x75, 0x73, 0x72, 0x2F, 0x6C, 0x6F, 0x63, 0x61, 0x6C, 0x2F, 0x62, 0x69, 0x6E, 0x2F, 0x70, 0x65, 0x72, 0x6C])\n    with open(file_path, \"rb\") as f:\n        return f.read(30) == signature","node":"function isPM(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x65, 0x76, 0x61, 0x6C, 0x20, 0x22, 0x65, 0x78, 0x65, 0x63, 0x20, 0x2F, 0x75, 0x73, 0x72, 0x2F, 0x6C, 0x6F, 0x63, 0x61, 0x6C, 0x2F, 0x62, 0x69, 0x6E, 0x2F, 0x70, 0x65, 0x72, 0x6C]);\n  return buffer.subarray(0, 30).equals(signature);\n}","go":"func IsPM(data []byte) bool {\n    signature := []byte{0x65, 0x76, 0x61, 0x6C, 0x20, 0x22, 0x65, 0x78, 0x65, 0x63, 0x20, 0x2F, 0x75, 0x73, 0x72, 0x2F, 0x6C, 0x6F, 0x63, 0x61, 0x6C, 0x2F, 0x62, 0x69, 0x6E, 0x2F, 0x70, 0x65, 0x72, 0x6C}\n    if len(data) < 30 {\n        return false\n    }\n    return bytes.Equal(data[:30], signature)\n}"},"category":"Source Code"}}