Skip to content

Conversation

@book
Copy link
Contributor

@book book commented Nov 26, 2025

The third paragraph of perlop says:

There are a few exceptions though: The operator x can be either string repetition or list repetition, depending on the type of the left operand, and &, |, ^ and ~ can be either string or numeric bit operations.

I think it would be worth mentioning the 'bitwise' feature there, which gives the bitwise operators a numeric and a string version, making them less of an exception in modern Perl.

@Grinnz said on IRC:

given that use v5.28 and above enable it automatically, I think it's worth explicitly calling out the different reality in modern perl

This patch is the smallest thing I could come up with, and this PR is meant to be a conversation starter to find a better wording for this.

  • This set of changes does not require a perldelta entry.

@book book force-pushed the book/perlop-dual-bitwise-operators branch from b0a3faf to 82ab17b Compare November 27, 2025 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants