in reply to Re: Pe(a)rls in line noise
in thread Pe(a)rls in line noise
Well, you're in good company then, because this was the first JAPH I ever made myself. Honest!
Yep, that's just eye candy. There have been some JAPH's recently that used magical increment for an X number of times, and I was going for similarly looking numbers. The:@; = (491036,8051555,4785250,3341086,912133,189089,691108);
and at the end: x: are also just eye candy. I tried several Larry Wall quotes while building this japh, and the line with '=====' made it possible for me to easily switch between keys and value in the hash (change the space between the "==="'s to "=" and all keys are values and vice versa in the hash).================================= ==================================
was actually a kludge. Originally I had the "to do" exchanged in the quote. But I found the error in the quote too obvious.$:{do} = 'to';
This actually works because whatever order hash keys have in a hash, the order returned by the "keys()" and "values()" functions is the same. And for some reason, I _had_ to put parentheses with keys() and values() because otherwise I was getting the warning that the call was ambiguous. That's still on my list to check out later.eval '$:{q?'.$_.'?}=~s'.shift@; for keys(%;);
is what you call an interpolated anonymous hash slice ;-) Working from the outside in: the qq{...} creates an interpolated string, which will put spaces between the elements because $" was not changed. The @{...} dereferences an array reference. The [...] create a reference to an array. The @:{...} creates a hash slice on %:. And finally the qw{...} creates the array of keys for the hash slice.$_ = qq{@{[@:{qw{ He didn't do it }}]}};
...cause the print, exit, code will take over from there...
I don't know if that is what you meant to say, but after the "exit" there is no code to execute anymore. So the "x:" is never reached, it's just eye candy.
Liz
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Pe(a)rls in line noise
by Roger (Parson) on Sep 16, 2003 at 01:31 UTC |