"What's the best way to read a fixed length record in Perl"
Is it truly profoundly fixed-length? Do the rules change? Are there other constraints or anticonstraints?
Perhaps the best way is to master regular expressions. By "best" I mean it is the "code that most follows the way humans think"
So you have something that looks like this .. $stuff = "cat dog"
For now assume YOU ABSOLUTELY KNOW it is three letters, a space, and three letters.
So it's just this:
$stuff =~ /([a-z]{3}) ([a-z]{3})/;
$first_word_found = $1;
$second_word_found = $2;
nothing could be more natural. Obverve that you have total control over the format of the stuff.
In the example, I said "it must be lower case" ... hence "[a-z]" But of course, you could "specify" it any way you want, anything that can possibly be decribed you can do in a regular expression.
If you know that the gap in the middle might be perhaps more than one space, or other types of whitespace or something else, you can easily account for that in the regex.
The regex defines the laws of the universe, for, how the stuff in question "should be" ("according to you")
Alternately if you want less and less rules, so that the format of "stuff" is more and more flexible, a regex is exactly how you "state" that nature.
I have found in the very real world, this type of thing is almost always necessary. Because inevitably you are checking that something obeys some set of rules that have been described in the human world, you're changing those rules over time, you're adding new fields (or whatever the case is) and so on.
It might work for you!