Quote::Ref - qw for array/hash references
use Quote::Ref; my $aref = qwa(foo bar baz); # $aref = [ qw(foo bar baz) ] my $href = qwh(foo 1 bar 2); # $href = { qw(foo 1 bar 2) }
This module provides the new keywords qwa and qwh.
qwa
qwh
qwa is a quoting operator like q or qq. It works like qw in that it parses its contents as a list of whitespace separated words, but instead of turning them into a list, it turns them into an array reference. That is, qwa!...! works like [ qw!...! ].
qw
qwa!...!
[ qw!...! ]
qwh is a quoting operator like q or qq. It works like qw in that it parses its contents as a list of whitespace separated words, but instead of turning them into a list, it turns them into an hash reference. That is, qwh!...! works like { qw!...! }.
qwh!...!
{ qw!...! }
Lukas Mai, <l.mai at web.de>
<l.mai at web.de>
Copyright 2013 Lukas Mai.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Quote::Ref, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Quote::Ref
CPAN shell
perl -MCPAN -e shell install Quote::Ref
For more information on module installation, please visit the detailed CPAN module installation guide.