in reply to Hex to array conversion
my @rgbVals = qw{ #ff00ff #2e7fee };
warned with
Possible attempt to put comments in qw() list ...
The category I found to switch the warning off was "syntax" which potentially covers a lot of ground; "comment" or "comments" was not recognised. Here's the code
use strict; use warnings; my @rgbVals = do { no warnings q{syntax}; qw{ #ff00ff #2e7fee }; }; print map { qq{@{ [ join q{,}, map { hex } m{^.(..)(..)(..)} ] }\n} } @rgbVals;
I'd be interested in knowing if there was some finer-grained warnings category covering this.
Cheers,
JohnGG
Update: Thanks to toolic, TGI and FunkyMonk for the responses. I did try to find out in warnings but no luck there. I found "syntax" in a table in the Camel book (3rd Edn. pp 863) but didn't see "qw".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hex to array conversion
by TGI (Parson) on Oct 08, 2007 at 18:48 UTC | |
|
Re^2: Hex to array conversion
by FunkyMonk (Bishop) on Oct 08, 2007 at 20:54 UTC | |
|
Re^2: Hex to array conversion
by toolic (Bishop) on Oct 08, 2007 at 15:32 UTC |