Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re^4: secret code generator

by johngg (Abbot)
on Dec 19, 2006 at 11:32 UTC ( #590647=note: print w/replies, xml ) Need Help??

in reply to Re^3: secret code generator
in thread secret code generator

Easier to understand? Debateable. I feel that this

my @chars = ("a".."z", "A".."Z", 0..9 , split //, qq(!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~));

looks a bit messy and it is difficult to see at a glance, or even with a long stare, if you've got them all. In fact, I think tilly will have missed one since qq{...} is going to lose the backslash so q{...} might have been better.

$ perl -le 'print for split m{}, qq{!@#{}[\]&*};' ! @ # { } [ ] & * $ perl -le 'print for split m{}, q{!@#{}[\]&*};' ! @ # { } [ \ ] & * $



Update: Added one-liners to show backslash behaviour

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://590647]
[shmem]: hmm... there should be a glyph for "bembel" in unicode "miscellaneous symbols"
[karlgoethebier]: shmem: ++1000. Also for Schöppsche
[Eily]: shmem Indeed :)
[choroba]: How is Bembel different from Krug?
[hippo]: karlgoethebier, Ich habe kein Deutsch.
[Corion]: choroba: A Bembel is a traditional pottery ware, which is only(!) used for serving Cider (well, Apfelwein)
[shmem]: choroba: it's hessisch
[Corion]: Not every Krug is a Bembel!
[karlgoethebier]: there is just the mug: 🍺
[Corion]: A Bembel must look like this

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (17)
As of 2017-05-24 08:46 GMT
Find Nodes?
    Voting Booth?