http://qs321.pair.com?node_id=11129702

bobo999 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, This is my first post. I've encountered some Perl functionality that I can't find any documentation for and can be demonstrated by the following two command lines (I'm running on Linux and Perl v5.26.1):

perl -E 'printf "%s\n", chr 65'

This line prints the character 'A'. The following line also prints the character 'A'

perl -E 'printf "%s\n", v65'

It appears that v<number> is some kind of internal equivalent to chr(number) call, however, I can't find any search results in any of my perl books and Google searches. Can anyone shed some light on this?

Replies are listed 'Best First'.
Re: Undocumented Perl Functionality
by haukex (Archbishop) on Mar 15, 2021 at 18:22 UTC
    It appears that v<number> is some kind of internal equivalent to chr(number)

    Version Strings

      Thanks for your response. Version strings are not covered/documented in any of my programming Perl books so no wonder I couldn't find any information about them. It's time to get the latest Perl book!
        It's time to get the latest Perl book!

        AFAICT, they first showed up in the 3rd Edition Camel as "V-String Literals" and in the 4th ed as "Version Literals".

        And by the way, welcome to the Monastery!

          Version strings are not covered/documented in any of my programming Perl books ..

        I have the fourth edition of the Camel (February 2012), and v-string is defined on page 1080. :)

        Alex / talexb / Toronto

        Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.