Variable Variables

Get introduced to variable variables in this lesson and learn how you can use them in Perl.

What are variable Variables?

Using Perl, we can access data through dynamic variable names. The name of a variable can be stored in another variable, allowing it to be accessed dynamically. Such variables are known as variable variables.

To turn a variable into a variable variable, you put an extra $ sign in front of your variable. This method is illustrated in the following figure:

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy