1 1.1 christos #------------------------------------------------------------------------------ 2 1.1.1.4 christos # $File: perl,v 1.20 2012/06/21 01:16:49 christos Exp $ 3 1.1 christos # perl: file(1) magic for Larry Wall's perl language. 4 1.1 christos # 5 1.1 christos # The `eval' lines recognizes an outrageously clever hack. 6 1.1 christos # Keith Waclena <keith (a] cerberus.uchicago.edu> 7 1.1 christos # Send additions to <perl5-porters (a] perl.org> 8 1.1.1.2 christos 0 search/1/w #!\ /bin/perl Perl script text executable 9 1.1 christos !:mime text/x-perl 10 1.1 christos 0 search/1 eval\ "exec\ /bin/perl Perl script text 11 1.1 christos !:mime text/x-perl 12 1.1.1.2 christos 0 search/1/w #!\ /usr/bin/perl Perl script text executable 13 1.1 christos !:mime text/x-perl 14 1.1 christos 0 search/1 eval\ "exec\ /usr/bin/perl Perl script text 15 1.1 christos !:mime text/x-perl 16 1.1.1.2 christos 0 search/1/w #!\ /usr/local/bin/perl Perl script text executable 17 1.1 christos !:mime text/x-perl 18 1.1 christos 0 search/1 eval\ "exec\ /usr/local/bin/perl Perl script text 19 1.1 christos !:mime text/x-perl 20 1.1 christos 0 search/1 eval\ '(exit\ $?0)'\ &&\ eval\ 'exec Perl script text 21 1.1 christos !:mime text/x-perl 22 1.1.1.3 christos 0 search/1 #!/usr/bin/env\ perl Perl script text executable 23 1.1.1.3 christos !:mime text/x-perl 24 1.1.1.3 christos 0 search/1 #!\ /usr/bin/env\ perl Perl script text executable 25 1.1.1.3 christos !:mime text/x-perl 26 1.1 christos 27 1.1 christos # by Dmitry V. Levin and Alexey Tourbin 28 1.1 christos # check the first line 29 1.1 christos 0 search/1 package 30 1.1 christos >0 regex \^package[\ \t]+[0-9A-Za-z_:]+\ *; Perl5 module source text 31 1.1.1.4 christos !:strength + 10 32 1.1 christos # not 'p', check other lines 33 1.1 christos 0 search/1 !p 34 1.1 christos >0 regex \^package[\ \t]+[0-9A-Za-z_:]+\ *; 35 1.1 christos >>0 regex \^1\ *;|\^(use|sub|my)\ .*[(;{=] Perl5 module source text 36 1.1.1.4 christos !:strength + 10 37 1.1 christos 38 1.1 christos # Perl POD documents 39 1.1 christos # From: Tom Hukins <tom (a] eborcom.com> 40 1.1.1.2 christos 0 search/1/W \=pod\n Perl POD document text 41 1.1.1.2 christos 0 search/1/W \n\=pod\n Perl POD document text 42 1.1.1.2 christos 0 search/1/W \=head1\ Perl POD document text 43 1.1.1.2 christos 0 search/1/W \n\=head1\ Perl POD document text 44 1.1.1.2 christos 0 search/1/W \=head2\ Perl POD document text 45 1.1.1.2 christos 0 search/1/W \n\=head2\ Perl POD document text 46 1.1.1.4 christos 0 search/1/W \=encoding\ Perl POD document text 47 1.1.1.4 christos 0 search/1/W \n\=encoding\ Perl POD document text 48 1.1.1.4 christos 49 1.1 christos 50 1.1 christos # Perl Storable data files. 51 1.1 christos 0 string perl-store perl Storable (v0.6) data 52 1.1 christos >4 byte >0 (net-order %d) 53 1.1 christos >>4 byte &01 (network-ordered) 54 1.1 christos >>4 byte =3 (major 1) 55 1.1 christos >>4 byte =2 (major 1) 56 1.1 christos 57 1.1 christos 0 string pst0 perl Storable (v0.7) data 58 1.1 christos >4 byte >0 59 1.1 christos >>4 byte &01 (network-ordered) 60 1.1 christos >>4 byte =5 (major 2) 61 1.1 christos >>4 byte =4 (major 2) 62 1.1 christos >>5 byte >0 (minor %d) 63