| [reply] |
Ree, I'm going to give you the benefit of the doubt here and assume you saw a question you liked, didn't quite understand the answers given and maybe hoped you could get answers you understood better here.
It doesn't change a thing.
Informing the site is not the problem here. Presenting other people's work without giving them credit for it is the problem. Someone else, not you, worked hard to come up with a good question. You dishonor them by not giving them credit for the question and presenting it as your own. It is not enough to have a blind link to the stack flow site. You must name the person who wrote the work.
As far as permission and apologies - forget the institution of stack flow. It is the real live people who worked on those questions from whom you need to ask both permission and forgiveness.
You don't owe apologies to us. You, at present, owe apologies to
Best, beth
| [reply] |
Addendum to ELESHEVA's parent node:
You dishonor them by not giving them credit for the question and presenting it as your own and you dishonor yourself.
| [reply] |
Because that is the way that you access the arrays and hashes in Perl, that you have created. Granted, that will all change in Perl 6, but in Perl 5 and below, that is how it is done.
Regards,
Jeff
"Every time Linux boots, a penguin gets its wings"
| [reply] |
Wouldn't it be illegal Perl code if it was anything but a $ in that place?
The reason the sigil is required is that it designates what you are retrieving from the container. So for instance, @array[] is suggesting that you are accessing an array and expecting an array from it. This is called an array slice. Similarly, @hash{} is a hash slice, and you are expecting more than one value from the hash. To retrieve multiple values, you have to provide multiple indexes/keys. So for an array: my @values = @array[1, 3, 5, 7], and for a hash: my @values = @hash{qw/a b c/};
| [reply] [d/l] [select] |
The $ indicates the context of what follows. The general point about sigils is an interesting one. Comparing Perl with Python (which does not have sigils on variables, but does use them elsewhere), Python does not support interpolation, so variables cannot be embedded inside double "quotes". It also has to jump through hoops to achieve things like @hash{@keys} = @values. This is not to flame Python, those guys would say the price of sigils is too high.
Perl is Open Source - there is nothing stopping you from downloading the source and altering it to do whatever you like. | [reply] [d/l] |