http://www.perlmonks.org?node_id=886471


in reply to Re^2: Question about binary file I/O
in thread Question about binary file I/O

You are giving pack a list, it just happens to have only one element, and you are getting a string back, you can replace 'S*' with 'S1' to make it clearer.

Update: the 'trouble' strict mode causes is to ensure you declare your variables, preventing typoed variables from being accepted without complaint, for example. As to $/, reading in perlvar documents its behaviour when set to a reference to an integer, or variable containing an integer 'will attempt to read records instead of lines, with the maximum record size being the referenced integer. '. As to read and the like, there are a lot less cumbersome versions in IO::Handle which lets you treat filehandles like objects with methods.