Help needed on my $format

I am stuck with values in existing program perl script...

my $format ="a40a9a*";

please help me to understand what is the value of "a40a9a*" .

Thanks in advance!

I suppose it depends on where you then use it. As you have it, it is just a literal string.

It could be used as a filename to search, policy reference for car insurance (to search by type) hardware manufacturer if you are setting up asset tracking system or all sorts of things.

Can you give a bit more context in where you found this and what you are trying to achieve?

Thanks, in advance,
Robin

2 Likes

Hi.

N.B.:

This looks like a pack/unpack format.

See man perlpacktut , where code like:

... unpack("A10xA27xA7A*" ...

is discussed.

See perldoc -f pack for a table of the format descriptors.

Best wishes ... cheers, drl

2 Likes

Thanks Robin and drl.

Found the answer "a40" is 4th column of the line and "a9a" is nine bytes length.

Admin,

Please close the thread.

Thanks once again!