Re: FAQ 4.24 How do I reverse a string?



brian d foy <brian.d.foy@xxxxxxxxx> wrote:
<jurgenex@xxxxxxxxxxx> wrote:
PerlFAQ Server <brian@xxxxxxxxxxxxxx> wrote:
4.24: How do I reverse a string?
Use "reverse()" in scalar context, as documented in "reverse" in
perlfunc.

$reversed = reverse $string;

Duuuh, isn't that rather obvious?

It's not been obvious to most people I teach. Most people only see it
as a list operator.

Therefore I suggest removing it.

It's not hurting anyone where it is.

It is cluttering the FAQ, therefore I suggested removing it /if/ it
doesn't provide any useful information. However apparently there are
indeed people to whom it is useful.

Do others share Brian's experience/sentiment?

jue
.



Relevant Pages

  • Re: FAQ 4.24 How do I reverse a string?
    ... $reversed = reverse $string; ... Duuuh, isn't that rather obvious? ... doesn't provide any useful information. ...
    (comp.lang.perl.misc)
  • Re: FAQ 4.24 How do I reverse a string?
    ... perlfunc. ... $reversed = reverse $string; ... Duuuh, isn't that rather obvious? ...
    (comp.lang.perl.misc)
  • Re: LED Shorted??
    ... where human factors and lack of reverse ... I've associated end of life or infant mortality of LEDs ... So you have the current through string and voltage across the string? ... at least I put one there so the inductor doesn't kill itself. ...
    (sci.electronics.design)
  • Re: Reverse words in a string (Another Interview question)
    ... >> I'm using a linked list to contain words that will be output in reverse ... A stack is exactly that. ... C's string handling sucks. ... > void reverse_string(char * ostr) ...
    (comp.programming)
  • Re: LED Shorted??
    ... where human factors and lack of reverse ... I've associated end of life or infant mortality of LEDs ... So you have the current through string and voltage across the string? ...
    (sci.electronics.design)