Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: (Golf) Reversal

by MeowChow (Vicar)
on May 02, 2001 at 08:55 UTC ( #77239=note: print w/replies, xml ) Need Help??

in reply to (Golf) Reversal

12 so far:
sub R { ''.reverse@_ }
Hmmm... here's an 11 character one that works on your examples, only because they are numbers:
sub R { 0+reverse@_ }
               s aamecha.s a..a\u$&owag.print

Replies are listed 'Best First'.
Re: Re: (Golf) Reversal
by japhy (Canon) on May 02, 2001 at 09:10 UTC
    Ok. Now come up with an 11-character one that works for non-numbers. ;)
    Hint? I'm being a bit of a wise-ass, aren't I? ;)

    japhy -- Perl and Regex Hacker
        Ok, question: What the...??? (I don't doubt that this works, but I've never seen that construct before...)

        Dr. Michael K. Neylon - || "You've left the lens cap of your mind on again, Pinky" - The Brain

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://77239]
[Corion]: This is vaguely inspired by that list of "nasty" strings, which I'd like to replace among HTTP parameters, just to see whether the application crashes, but also for easy downloading of a list of URLs etc
[Corion]: Maybe I'll just conoct something using Algorithm::Permute to create an (OO) generator for such requests, or a simple function.
[Corion]: For testing I imagine one would want to test a random sampling of such "bad"/"unexpected" requests, while for downloading, one would want to generate them all in order, but not necessarily as a huge list
[Corion]: s/Algorithm:: Permute/Algorithm ::Loops/

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2017-01-16 15:42 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (151 votes). Check out past polls.