-
Notifications
You must be signed in to change notification settings - Fork 555
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
[doc] perlsyn doesn't have any "push my ..." examples #22214
Comments
|
I wish the documentation would say just what you said too then. But it's never mentioned that either. Anyway I've never seen anybody use the useage that I've presented. How did I figure it out? By accident! |
You likely don't see it a lot because |
Well that is very well and good that most people can immediately tell that they're all the same. But for us other people, they're totally two different animals. And never having seen exactly even one example of my style, I think it would be high time to throw a few on some Man pages. Thanks. |
Sorry? Just to clarify... Are you saying you've not ever seen |
It's fine to have a personal style, but the docs are not the place to evangelize it. Especially when it is a lot easier to get this wrong than the obvious |
It is somewhat reminiscent of: for my $item ( @items ) {
...
}
or: chomp my $line = readline();
I also like this style and use it a lot, ie. defining/declaring/scoping variables in-place (rather than in a separate statement earlier). I find it to be a lovely Perlism esp. where other languages lack this "shortcut". |
No one argued against declaring variables in-place per se, and in fact we have plenty of examples of that in our docs. |
Maybe somewhere in the docs have a
|
@jidanni The motto of perl is "There's more than one way to do it". |
Works great. Needs an example on perlsyn.
The text was updated successfully, but these errors were encountered: