Perl Tutorials - Herong's Tutorial Examples
Dr. Herong Yang, Version 5.00

Open Files in Binary Mode

This chapter provides tutorial examples and notes about opening files in binary mode. Topics include using binmode() to open files in binary mode; Copy.pl - copying binary files; Bin2Hex.pl - converting binary data to hex numbers.

binmode() - Opening Files for Binary Input

binmode() - Opening Files for Binary Output

Copy.pl - Copying Binary Files

Bin2Hex.pl - Converting Binary Data to Hex Numbers

Conclusions:

  • binmode() - Setting file handlers to binary mode.
  • Copy.pl - Copying binary files.
  • Bin2Hex.pl - Converting binary data to hex numbers.

Dr. Herong Yang, updated in 2008
Open Files in Binary Mode