Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Undocumented Perl Functionality

by bobo999 (Initiate)
on Mar 15, 2021 at 18:19 UTC ( #11129702=perlquestion: print w/replies, xml ) Need Help??

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 (Bishop) 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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11129702]
Approved by haukex
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (1)
As of 2022-05-21 19:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (77 votes). Check out past polls.

    Notices?