O'Reilly logo

Win32 Perl Programming: The Standard Extensions, Second Edition by Dave Roth

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to Write a Perl Extension

Before understanding how to create an extension, you need to familiarize yourself with a couple of rather important topics, the first of which is how Perl handles variables.

The Guts of Perl Variables

A Perl scalar variable is really a memory structure known as an SV (scalar variable). When your script creates a new scalar variable, a memory structure is allocated, and the value is assigned to it. If you ever access the value in a different context (such as accessing an integer as a string), the SV will convert itself to the context value. If you create a variable, assigning it the value 10, for example, SV is created containing the integer value 10. If you then try to print out the value, the SV will have to convert ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required