2 #------------------------------------------------------------------------------
3 # $File: perl,v 1.16 2009/09/19 16:28:11 christos Exp $
4 # perl: file(1) magic for Larry Wall's perl language.
6 # The `eval' lines recognizes an outrageously clever hack.
7 # Keith Waclena <keith@cerberus.uchicago.edu>
8 # Send additions to <perl5-porters@perl.org>
9 0 search/1/w #!\ /bin/perl Perl script text executable
11 0 search/1 eval\ "exec\ /bin/perl Perl script text
13 0 search/1/w #!\ /usr/bin/perl Perl script text executable
15 0 search/1 eval\ "exec\ /usr/bin/perl Perl script text
17 0 search/1/w #!\ /usr/local/bin/perl Perl script text executable
19 0 search/1 eval\ "exec\ /usr/local/bin/perl Perl script text
21 0 search/1 eval\ '(exit\ $?0)'\ &&\ eval\ 'exec Perl script text
25 # by Dmitry V. Levin and Alexey Tourbin
26 # check the first line
28 >0 regex \^package[\ \t]+[0-9A-Za-z_:]+\ *; Perl5 module source text
29 # not 'p', check other lines
31 >0 regex \^package[\ \t]+[0-9A-Za-z_:]+\ *;
32 >>0 regex \^1\ *;|\^(use|sub|my)\ .*[(;{=] Perl5 module source text
37 # From: Tom Hukins <tom@eborcom.com>
38 0 search/1/W \=pod\n Perl POD document text
39 0 search/1/W \n\=pod\n Perl POD document text
40 0 search/1/W \=head1\ Perl POD document text
41 0 search/1/W \n\=head1\ Perl POD document text
42 0 search/1/W \=head2\ Perl POD document text
43 0 search/1/W \n\=head2\ Perl POD document text
45 # Perl Storable data files.
46 0 string perl-store perl Storable (v0.6) data
47 >4 byte >0 (net-order %d)
48 >>4 byte &01 (network-ordered)
52 0 string pst0 perl Storable (v0.7) data
54 >>4 byte &01 (network-ordered)
57 >>5 byte >0 (minor %d)