in reply to Re: Is it possible to overload backticks (qx) operator
in thread Is it possible to overload backticks (qx) operator
what I have:
bdimych@bolshakovxp ~ $ perl -v This is perl, v5.10.0 built for cygwin-thread-multi-64int (with 6 registered patches, see perl -V for more detail) Copyright 1987-2007, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge. bdimych@bolshakovxp ~ $ cat 1.pl BEGIN { use overload; use Data::Dumper; overload::constant 'q' => sub { print Dumper \@_; }; } qq(echo aaa); qx(echo aaa); bdimych@bolshakovxp ~ $ perl 1.pl $VAR1 = [ 'echo aaa', 'echo aaa', 'qq' ]; $VAR1 = [ 'echo aaa', 'echo aaa', 'qq' ]; bdimych@bolshakovxp ~ $ uname -a CYGWIN_NT-5.1 bolshakovxp 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygw +in
|
|---|