Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

recurring perl bug: capital Z's.

by Vynce (Friar)
on Nov 12, 2001 at 08:05 UTC ( #124735=note: print w/ replies, xml ) Need Help??


in reply to A little fun with merlyn

hm. from jcwren's code:

'X' => \@char_X, 'Y' => \@char_Y, 'z' => \@char_z,

i'm sure you mean capital Z's there. and really, couldn't this whole chain of stuff be done automaticaly? laziness, man. you've typed basically the same line 50 times.

the reason i call this a recurring bug is that if you own the magnetic perl poetry kit (sadly apparently no longer available), as i do, you will notice upon close inspection that it comes with each of the 25 lowercase letters a through y and a capital Z. apparently perlers are bad with z-capitalization.

.


Comment on recurring perl bug: capital Z's.
Download Code
Re: recurring perl bug: capital Z's.
by Fletch (Chancellor) on Nov 12, 2001 at 09:08 UTC

    and really, couldn't this whole chain of stuff be done automaticaly? laziness, man. you've typed basically the same line 50 times.

    How do you know he didn't do it automatically? :) At any rate, yes you could have it generated programatically. If they weren't lexically declared and were stuck in their own package you could just slurp from the symbol table. But something like this would work in this case where they are lexicals.

    { no strict 'refs'; my @chrs = ( 'a'..'h', 'k', 'm', 'n', 'p'..'z' ); push @chrs, map uc, @chrs; push @chrs, 2..9; $charlist{ $_ } = \@{"char_$_"} foreach @chrs; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://124735]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2014-08-02 06:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (55 votes), past polls