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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:45:59+00:00 2026-05-12T18:45:59+00:00

Does anyone know what parsing or precedence decisions resulted in the warning ‘Use of

  • 0

Does anyone know what parsing or precedence decisions resulted in the warning ‘Use of “shift” without parentheses is ambiguous’ being issued for code like:

shift . 'some string';

# and not

(shift) . 'some string'; # or
shift() . 'some string';

Is this intentional to make certain syntactic constructs easier? Or is it merely an artifact of the way perl’s parser works?

Note: this is a discussion about language design, not a place to suggest

"@{[shift]}some string"
  • 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-12T18:45:59+00:00Added an answer on May 12, 2026 at 6:45 pm

    With use diagnostics, you get the helpful message:

        Warning: Use of "shift" without parentheses is ambiguous at (eval
            9)[/usr/lib/perl5/5.8/perl5db.pl:628] line 2 (#1)
        (S ambiguous) You wrote a unary operator followed by something that
        looks like a binary operator that could also have been interpreted as a
        term or unary operator.  For instance, if you know that the rand
        function has a default argument of 1.0, and you write
    
            rand + 5;
    
        you may THINK you wrote the same thing as
    
            rand() + 5;
    
        but in actual fact, you got
    
            rand(+5);
    
        So put in parentheses to say what you really mean.
    

    The fear is you could write something like shift .5 and it will be parsed like shift(0.5).

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

Sidebar

Related Questions

Does anyone know of any websites, or (preferably) downloadable packages that you can use
Does anyone know whether there is a java library for parsing a MySQL schema?
Does anyone know why this is happening? I'm doing basic indexing + SAX parsing
Does anyone know any resources (books/websites/whatever) related to parsing. I'm not so much interested
Does anyone know what the weakest family of widely-used parsing algorithms is that can
Does anyone know where to find source code for parsing doubles? I'm looking for
Does anyone know how to disable auto parsing of chars such as > so
Does anyone know of an Open Source library for parsing/reading Stata files in .net?
Does anyone know if Dojo has a way of parsing XML objects using XPath?
Does anyone know of a generic phone number parsing library for .NET? Ideally I'm

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.