Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Perl: porters

Re: [perl #39187] [DOC-PATCH]: perldoc -f reverse: examples (was: RE: Perlfunc needs to be made more clear regarding reverse in scalar context.)

 

 

Perl porters RSS feed   Index | Next | Previous | View Threaded


demerphq at gmail

May 17, 2008, 3:05 AM

Post #1 of 1 (52 views)
Permalink
Re: [perl #39187] [DOC-PATCH]: perldoc -f reverse: examples (was: RE: Perlfunc needs to be made more clear regarding reverse in scalar context.)

2008/5/16 Bram via RT <perlbug-followup[at]perl.org>:
> On Tue May 23 02:34:11 2006, theodore[at]websitters.com wrote:
>> Perlfunc gives these as examples of reverse:
>>
>> print reverse <>; # line tac, last line
>> first
>> undef $/; # for efficiency of <>
>> print scalar reverse <>; # character tac, last line
>> tsrif
>>
>> This is very clear for using reverse in list context,
>> but not so clear for reversing the characters in the
>> list, and very unclear regarding reversing a string.
>> I've read this many times, but didn't realize that you
>> could reverse a string until someone told me today. Is
>> there any way you can add a line to make this more
>> clear? Perhaps something like:
>>
>> print scalar reverse $_;
>>
>> Thank you for your attention to this matter.
>> -Ted
>
>
> Patch that changes the examples in perlfunc/reverse attached.


Thanks. Applied as 33840.

http://public.activestate.com/cgi-bin/perlbrowse/p/33840

Cheers,
yves


--
perl -Mre=debug -e "/just|another|perl|hacker/"

Perl porters RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.