From: JustinMacCarthy (macarthy at domain iol.ie)
Date: Fri 10 Aug 2001 - 12:33:03 IST
Hi all, I'm just writting a perl script to dump a file in HEX I came across
this, which does what I want but can someone explain this line to me ? or
write it differently ?
for(map ord, split // , $buf)
Thanks
~J
$file = $ARGV[0];
open (FILE, $file) or die "Can't open file";
while ( read (FILE , $buf , 1024) )
{
for(map ord, split // , $buf)
{
printf "%02x ",$_;
}
}
close (FILE);
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:11:32 GMT