printf REBINOUT pack('V',$counts_rebin[$i]); # l: 1188
Use print instead of printf.
printf needs a format specification string as the first argument after the file handle REBINOUT. As you have not specified one, your packed data is being misinterpreted as a format string...
Update: Your "uninitialized values" errors might have to do with that you're initializing @energy_before with a loop running up to 16384, but then are retrieving values from that array up to an index of 16831 ... (though I must admit I haven't looked into the code too deeply)
In reply to Re: Spurious `undefined' values and conversion issues
by almut
in thread Spurious `undefined' values and conversion issues
by sf_ashley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |