Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8118399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:28:40+00:00 2026-06-06T04:28:40+00:00

What is the @. variable in perl? It appears be a special, writeable global,

  • 0

What is the @. variable in perl?

It appears be a special, writeable global, and (surprisingly) does not interpolate in double-quoted strings:

use strict;
use warnings;

                 # Under 5.8, 5.10, 5.12, 5.14, and 5.16,
                 # the following lines produce:

@. = (3, 2, 1);  # no error
print "@.\n";    # "@."
print @., "\n";  # "321"

eval 'my @.; 1'  # Can't use global @. in "my" at (eval 1)
  or die $@;     #  line 1, near "my @."

I couldn’t recall ever encountering it before, and didn’t see it in perlvar nor perldata.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T04:28:44+00:00Added an answer on June 6, 2026 at 4:28 am

    perldoc perlvar states:

    Perl variable names may also be a sequence of digits or a single punctuation or control character. These names are all reserved for special uses by Perl;

    and

    Perl identifiers that begin with digits, control characters, or punctuation characters are exempt from the effects of the package declaration and are always forced to be in package main; they are also exempt from strict 'vars' errors.

    You are using a reserved name. You should not expect to be able to rely on any features.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use instance variable in Perl OO -
I want to use Perl's sprintf to zerofill a variable. sprintf(%08d, $var); But I
Other languages with automatic variable declaration - like Perl - have a strict mode.
I recently came across a problem: how to define a global variable in perl
Perl and I disagree as to whether a variable is a number or not.
Possible Duplicate: How can I escape meta-characters when I interpolate a variable in Perl's
I have to search for a pattern inside a variable in Perl. The pattern
Perl has quite a few special variables such as @F , $! , %!
I needed to build a variable depth hash data structure in perl. Eventually I
I have a Perl class that contains a hash instance variable for storing other

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.