Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Undocumented Perl Functionality

by bobo999 (Initiate)
on Mar 15, 2021 at 18:19 UTC ( [id://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 (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.

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?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-04-23 17:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found