From: Scott Haneda <[EMAIL PROTECTED]>
> Hello, I have this small C app that someone wrote for me ages ago, and
> am tired of it breaking every time I move it around to various
> systems, I will include it below.
>
> I am hoping I can do this in perl, as a one liner, were it will read a
> the first 4 bytes of a file, grab 4 bytes out of the file, which is a
> big endian value, and return that as an int to me.
perldoc -f read
perldoc -f unpack
perldoc -f pack
And to simplify the code (so that you do not need to explicitely open
the file), look also into
perldoc perlvar
at the ARGV filehandle.
HTH, Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/