On Sat, Jan 25, 2014 at 4:12 PM, Paul Johnson <p...@pjcj.net> wrote: > $ perl -E '$h = { a => qr/y/ }; say $_ =~ $h->{a} for qw(x y z)'
Thanks, but then another doubt: having a look at http://perldoc.perl.org/perlop.html#Regexp-Quote-Like-Operators I dont understand how I can use the regexp for substitution, that is s/// as an hash value. The following is not working: my $hash = { q/regexp/ => qr/s,from,to,/ }; any clue? THanks, Luca -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/