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

Re^2: Array shortcut

by jettero (Monsignor)
on Jul 01, 2009 at 01:26 UTC ( [id://776233]=note: print w/replies, xml ) Need Help??


in reply to Re: Array shortcut
in thread Array shortcut

You can actually do some of them without needing chr. my @a = ('a' .. 'z');

my @a = ('a'..'z', 'A'..'Z', 0..9, qw(! @ # $ % ^ & *), ' '); # maybe?

Just another way to do it.

UPDATE: Or you could disable that warning. It is just a warning afterall.

-Paul

Replies are listed 'Best First'.
Re^3: Array shortcut
by toolic (Bishop) on Jul 01, 2009 at 01:36 UTC
    and avoid a warning by pulling '#' out of qw:
    my @chars = ('a' .. 'z', 'A' .. 'Z', 0 .. 9, '#', ' ', qw(! @ $ % ^ & +*));

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2024-04-19 10:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found