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 328659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:30:57+00:00 2026-05-12T09:30:57+00:00

First off, does anyone have a comprehensive list of the Perl special variables? Second,

  • 0

First off, does anyone have a comprehensive list of the Perl special variables?

Second, are there any tasks that are much easier using them? I always unset $/ to read in files all at once, and $| to automatically flush buffers, but I’m not sure of any others.

And third, should one use the Perl special variables, or be more explicit in their coding. Personally I’m a fan of using the special variables to manipulate the way code behaves, but I’ve heard others argue that it just confuses things.

  • 1 1 Answer
  • 2 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-05-12T09:30:57+00:00Added an answer on May 12, 2026 at 9:30 am

    1) As far as which ones I use often:

    • $! is quintessential for IO error handling

    • $@ for eval error handling when calling mis-designed libraries (like database ones) whose coders weren’t considerate enough to code in decent error handling other than “die”

    • $_ for map/grep blocks, although I 100% agree with a poster above that using it for regular code is not a good practice.

    • $| for flushing buffers

    2) As far as using punctuation vs. English names, I’ll pick on Marc Bollinger’s reply above although the same rebuttal goes for anyone arguing that there’s no benefit to using English names.

    “if you’re using Perl, you’re obviously not choosing it for neophyte readability”

    Marc, I find that is not always (or rather almost never) true. Then again, 99% of my Perl experience is writing production Perl code for large companies, 90% of it full fledged applications instead of 10-line hack scripts, so my analysis may not apply in other domains. The reasons such thinking as Marc’s is wrong are:

    • Just because I’m a Perl non-neophyte (to put it mildly), some noob analyst hired a year ago – or an outsourced “genius” – is probably not. You may not want to confuse them any more than they already are. “If code was hard to write, it should be hard to read” is not exactly high on the list of good attitudes of professional developers, in any language.

    • When I’m up at 2am, half-asleep and troubleshooting a production problem, I really do not want to depend on the ability of my already-nearly-blind eyes to distinguish between $! and $|. Especially in a code written by before mentioned “genius” who may not have known which one of them to use and switched them around.

    • When I’m reading a code left unfinished by a guy who was cough “restructured” cough out of the company a year ago, I’d rather concentrate on intricacies of screwy logic than readability of the punctuation soup.

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

Sidebar

Related Questions

let me first off noting that I have absolutely no idea what I'm doing
First off, does anyone know of a good place to get help with CodeIgniter?
First off, I'm using Access 2000 and DAO. I have code that executes a
First off, The Problem: We have a Web App with a Flash front-end that
First off, I am using Windows XP. I have multiple hard drives and it
First off, there's a bit of background to this issue available on my blog:
First off, I'm working on an app that's written such that some of your
First off, let me start off that I am not a .net developer. The
First off, it may seem that I'm asking for subjective opinions, but that's not
First off, it is nice that they are trying to get code completion on

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.