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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:04:32+00:00 2026-06-03T05:04:32+00:00

This is a stupid question; I need this for something more complicated but let’s

  • 0

This is a stupid question; I need this for something more complicated but let’s make it simple:

$i = quotemeta 'A';
$line =~ tr/a-z/$i-Z/;

This is a silly substitution, this should turn small letters to capital ones, but what ever I tried doesn’t work.

Ok so I see this brought lots of confusion, the real code should be:

$line =~ tr/A-Z/F-ZA-E/;

It should be a Caesers Chiper algorhytm. This works just fine if you want to change it by a fixed number of letters, but I need a variable so I could change it as many number of letters as I want to. But I want to ship eval
Thnx

P.S. Also, why doesn’t s/// work with ranges?

  • 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-03T05:04:33+00:00Added an answer on June 3, 2026 at 5:04 am

    If you really need tr, you could use eval:

    $i = quotemeta 'A'
    eval("\$line =~ tr/a-z/$i-Z/;");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry if this sounds like a really stupid question, but I need to make
This may be a stupid question to ask, but still I need to know
I'm more or less Java programmer, so this might be a stupid question, but
This may be a stupid question for some of you but I need to
You may think this question is stupid or something but as a new IT
This is a really stupid question, but I need a little reassurance/assistance. I have
This maybe a stupid question, but as I can not easily undo my change
maybe this is a stupid question but : i run perl 5.8.8 and i
I feel like this is a stupid question, but I can't think of a
Maybe this is a stupid question but it's bugging me. I have a bi-directional

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.