Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
Program to convert Numeric text file to Packed decimal file



aloktiwary
New User

May 20, 2009, 6:45 AM


Views: 6667
Program to convert Numeric text file to Packed decimal file

Is there any way to convert numeric values txt file to PACKED DECIMAL File.

Please help!

Regards,

Alok


KevinR
Veteran


May 20, 2009, 1:19 PM


Views: 6665
Re: [aloktiwary] Program to convert Numeric text file to Packed decimal file

look into the pack() function. Here is a link to a good tutorial:

http://perldoc.perl.org/perlpacktut.html
-------------------------------------------------


aloktiwary
New User

May 21, 2009, 6:29 AM


Views: 6651
Re: [KevinR] Program to convert Numeric text file to Packed decimal file

Thanks a lot but I am new to perl if you can provide me a small sample code it will be of great help.

Thanks,

Alok


KevinR
Veteran


May 21, 2009, 10:48 AM


Views: 6647
Re: [aloktiwary] Program to convert Numeric text file to Packed decimal file

I could read the documentation, try a few things and maybe figure it out, but I think you could do the same thing. So read the documentation, try a few things and see if you get it or not. Personally I don't even know what a "packed decimal file" is. But pack() is used to convert one thing into another thing so that is the place to start looking. Or ask on www.perlmonks.com and maybe someone there will already know how to do what you are asking.
-------------------------------------------------