perl 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #------------------------------------------------------------------------------
  2. # perl: file(1) magic for Larry Wall's perl language.
  3. #
  4. # The ``eval'' line recognizes an outrageously clever hack for USG systems.
  5. # Keith Waclena <keith@cerberus.uchicago.edu>
  6. # Send additions to <perl5-porters@perl.org>
  7. 0 string/b #!\ /bin/perl perl script text executable
  8. 0 string eval\ "exec\ /bin/perl perl script text
  9. 0 string/b #!\ /usr/bin/perl perl script text executable
  10. 0 string eval\ "exec\ /usr/bin/perl perl script text
  11. 0 string/b #!\ /usr/local/bin/perl perl script text
  12. 0 string eval\ "exec\ /usr/local/bin/perl perl script text executable
  13. 0 string eval\ '(exit\ $?0)'\ &&\ eval\ 'exec perl script text
  14. # a couple more, by me
  15. # XXX: christos matches
  16. #0 regex package Perl5 module source text (via regex)
  17. 0 string package Perl5 module source text
  18. # Perl POD documents
  19. # From: Tom Hukins <tom@eborcom.com>
  20. 0 string/B \=pod\n Perl POD document
  21. 0 string/B \n\=pod\n Perl POD document
  22. 0 string/B \=head1\ Perl POD document
  23. 0 string/B \n\=head1\ Perl POD document
  24. 0 string/B \=head2\ Perl POD document
  25. 0 string/B \n\=head2\ Perl POD document
  26. # Perl Storable data files.
  27. 0 string perl-store perl Storable(v0.6) data
  28. >4 byte >0 (net-order %d)
  29. >>4 byte &01 (network-ordered)
  30. >>4 byte =3 (major 1)
  31. >>4 byte =2 (major 1)
  32. 0 string pst0 perl Storable(v0.7) data
  33. >4 byte >0
  34. >>4 byte &01 (network-ordered)
  35. >>4 byte =5 (major 2)
  36. >>4 byte =4 (major 2)
  37. >>5 byte >0 (minor %d)