adobe.pl 393 B

123456789101112131415161718
  1. #!/usr/local/bin/perl -w
  2. # This Source Code Form is subject to the terms of the Mozilla Public
  3. # License, v. 2.0. If a copy of the MPL was not distributed with this
  4. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  5. while(<STDIN>)
  6. {
  7. if(/^#/)
  8. {
  9. print $_;
  10. }
  11. else
  12. {
  13. ($a, $b, $c,$d) = /^(....)(.)(..)(.*)$/;
  14. print "0x" . $c . $b . "0x" . $a . $d . "\n";
  15. }
  16. }