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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:49:13+00:00 2026-05-15T23:49:13+00:00

I edit my Perl scripts in Emacs, using CPerl mode. But the Emacs function

  • 0

I edit my Perl scripts in Emacs, using CPerl mode. But the Emacs function indent-region is broken in that mode. If I have a variable:

my $num_elements;

it becomes

my $num_ elements;

It’s very annoying, especially since I am used to using underscores in variable names, and I press the keyboard shortcut for indent-region all the time (actually, a custom indent-whole-buffer function based on it), it’s already automatic.

Does anyone know how to fix it?

I am using this Emacs:

GNU Emacs 21.4.1 (x86_64-redhat-linux-gnu, X toolkit, Xaw3d scroll bars) 
  of 2007-12-10 on hs20-bc1-5.build.redhat.com

UPDATE: Actually this happens only after a foreach (or similar):

foreach my $num_elements (1,2) {}

becomes:

foreach my $num_ elements (1,2) {}
  • 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-05-15T23:49:14+00:00Added an answer on May 15, 2026 at 11:49 pm

    Updated versions of cperl-mode are available. The official version and an unofficial version that’s aware of 5.10 and Moose. Updating to one of those should fix your problem.

    M-x describe-variable cperl-version will show what version of cperl-mode you’re using.

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

Sidebar

Related Questions

I have a function that I would like to define in two different Perl
I have a Perl script that I've written and can compile it using pp
I have a perl one-liner in a Makefile to edit files in place: perl
EDIT: See my answer below--> I am wanting to have a view that when
EDIT: iam using ajax to load text in my content that is why onload
I've been writing output from perl scripts to files for some time using code
I work in a project that uses Perl scripts on machines that are maintained
I am running multiple perl scripts (about 2-5) within a ASP.net page using VB.net.
I have a perl script which calls another perl script using backticks. I want
I have a perl script that is used to monitor databases and I'm trying

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.