Zefram <zefram@fysh.org> wrote on Fri, 01 Jul 2011 11:28:21 BST: >> We've already suffered enough from the problems of qr/.../'s trailing >> modifier syntax: > Indeed. But because qw can already take almost any character as a > delimiter, we can't really add a modifier at the beginning either. > It'll have to be a new operator, qwx. Which anyone interested can > prototype in a CPAN module for Perl 5.11.2+. You know, I have all *kinds* of constructs that work like ql(...), qwx(...), etc, which I use *all* the time. But I see no need to go rewriting the language to turn them into keywords proper, with all the attendant complexity and confusion. my $code = deQ<<'LITERAL' . deQQ<<"INTERPOLATED"; |Q| |Q| use utf8; |Q| |Q| sub convert_to_superscripts (_) { |Q| confess "argcount" unless @_ == 1; |Q| my $string = $_[0]; |Q| confess "want string" if ref $_[0]; LITERAL |QQ| |QQ| \$string =~ tr[$originals][$superscripts]; |QQ| return \$string; |QQ| } |QQ| |QQ| 'ig00' |QQ| INTERPOLATED eval $code || die; Since it can be done with existing technology, why *shouldn't* it be? --tomThread Previous | Thread Next