Discovered a new function...

blazar on 2006-11-13T23:01:58

Well, actually I completely ignore how new or old it may be, but I ignored its whole existence altogether, so... Whatever, it's study(). Is "to discover" the right verb for such a thing? Who knows... It was brought to my attention by a clpmisc post () but it was a perldoc perlfunc away. I didn't know it simply because I can't remember having seen it mentioned anywhere in discussion or example before today. And discussions and examples are very important means for me to learn...

BTW, I selected "User Journal" as a "Journal Topic", because I can't see any that is just "Perl": would there have been a more appropriate one? Is the topic important anyway, or can one safely just stick with "User Journal"?


Re:

Aristotle on 2006-11-14T11:32:20

I can’t remember having seen it mentioned anywhere in discussion or example before today.

That’s because it’s only rarely useful and very nearly never a clear win. You may as well never think about it, and it won’t make a difference.

If you want to see another relic burried in perlfunc that’s even less useful, check out reset.

Is the topic important anyway, or can one safely just stick with “User Journal”?

I’m not sure selecting a topic even has any effect at all. Maybe it does on Slashdot (which runs the same software) but not here. I think everyone just leaves that at default.

Re:

blazar on 2006-11-14T15:52:10

If you want to see another relic burried in perlfunc that’s even less useful, check out reset.

Indeed I can't remember having used it, but I had seen it before. Actually I have a hard time judging whether it's more or less useful than study(), although I'd rate it close to it. AIUI there's a difference though: the former has a semantic (side-)effect; the latter is only supposed to be (possibly) useful for speed optimization, but won't change what one's script will do in any way.

I’m not sure selecting a topic even has any effect at all. Maybe it does on Slashdot (which runs the same software) but not here. I think everyone just leaves that at default.

Also, I saw your links: up until now I used

<URL:http://example.com/>
as shown below the composition window: are there other shortcuts, or do I have just to put
<a>
tags manually for anything more complex than that?

Re:

Aristotle on 2006-11-14T17:37:11

the former has a semantic (side-)effect

That’s sort of tautologic, of course; its entire point is the side effect.

the latter is only supposed to be (possibly) useful for speed optimization

I know. However, it takes time itself and rarely usefully speeds up a match, so in the general case, it will cause a speed hit (albeit usually a small one). The circumstances in which it can provide a measurable speed-up are so specific that in practice, the function is useless. And that’s why it doesn’t come up.

do I have just to put <a> tags manually for anything more complex than that?

Yes – Slashcode offers no special markup other than <ecode> and the <URL:...> thing. But I use Markdown to write HTML in textareas anyway, so I don’t care much.