The problem I am having with the UNPACK function is the following:
I am currently unpacking a record of 220 bytes into 3 variables. The first is to be left untouched, the second has some search and replace stuff going on in it, and the third is untouched. When I print out the results after all the manipulation, I notice that the blank spaces in the 3rd variable are not there anymore. Does "unpack" do away with those? How can I keep them so I can keep my byte size per record the same.
Here is the code I am using for unpack. If you have any suggestions, please let me know.
while (<INPUTFILE>)
{
my $begin;
my $names;
my $end;
chomp;
($begin, $names, $end) = unpack('A10 A80 A129',$_);
Thanks in advance for your help.
Geek
I am currently unpacking a record of 220 bytes into 3 variables. The first is to be left untouched, the second has some search and replace stuff going on in it, and the third is untouched. When I print out the results after all the manipulation, I notice that the blank spaces in the 3rd variable are not there anymore. Does "unpack" do away with those? How can I keep them so I can keep my byte size per record the same.
Here is the code I am using for unpack. If you have any suggestions, please let me know.
while (<INPUTFILE>)
{
my $begin;
my $names;
my $end;
chomp;
($begin, $names, $end) = unpack('A10 A80 A129',$_);
Thanks in advance for your help.
Geek