Skip to content

[doc] perlop unneeded parentheses #17512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jidanni opened this issue Jan 31, 2020 · 0 comments · May be fixed by #23247
Open

[doc] perlop unneeded parentheses #17512

jidanni opened this issue Jan 31, 2020 · 0 comments · May be fixed by #23247

Comments

@jidanni
Copy link
Member

jidanni commented Jan 31, 2020

In perlop,

           next LINE if (1 .. /^$/);  # skip header lines, short for
                                      #   next LINE if ($. == 1 .. /^$/);

Actually all the parentheses can be removed from the example.

                                                 # (typically in a loop labeled LINE)

Actually LINE is special. Using e.g., LINEz would need a existing label.

khwilliamson added a commit to khwilliamson/perl5 that referenced this issue May 3, 2025
Statement modifiers don't need parentheses

Fixes Perl#17512
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant