Wei's tips

Wednesday, April 08, 2009

Binary numerical file IO in PERL

#following is a simple example
open FP, '>a.bin';
binmode FP; #make it binary file
@values=(3.2,3.3,3.4); #list of floating values
$a=pack 'f3' , @values; #pack as 32bit floating point value
#use 'd' for 64bit floating point
syswrite(FP,$a,12); #save to file
close FP;

posted by wavingblue at 4:54 PM

1 Comments:

Blogger 黑色 said...

影片瘋狂做愛影片蒼井空影片限制級影片限制級貼圖影片區影片分享區影片分享論壇影片分享影片免費看影片免費直播貼片影片live影片黃色影片貼片區影片論壇影片觀看卡通78論壇AV圖片AV線上片a片a圖a動漫A正妹牆A片線上直播A片貼圖a片貼片區A片區A片直播片A片免費觀賞A片免費播放a片免費女優dvd光碟女同志免費a片女同志免費影片女同志影片試看女人色情影片女人無碼影片女主播變可淫兒影片女學生自慰影片女孩自慰影片女女成人片女女性愛影片女女做愛影片女女電影女女色情片下載女女a片線上看

5:44 AM  

Post a Comment

<< Home

About Me

Name: wavingblue

View my complete profile

Previous Posts

  • US Government Balance
  • Styling form file input
  • Linking with static runtime libraries with MFC
  • Using C99 support in Intel Compiler
  • javascript variable scope
  • Image flicker in IE6
  • Save file using different extensions in MS Word
  • Open a file by drag-and-drop in MS Word
  • File Security tab in Windows XP
  • Misleading median income

Powered by Blogger