Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re^3: Question about binary file I/O

by james2vegas (Chaplain)
on Feb 06, 2011 at 03:03 UTC ( #886471=note: print w/replies, xml ) Need Help??

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://886471]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2018-01-20 13:04 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (226 votes). Check out past polls.