develooper Front page | perl.perl5.porters | Postings from June 2013

key value hash slices in strings

Thread Next
Ruslan Zakirov
June 16, 2013 09:21
key value hash slices in strings
Message ID:

Not sure what to do in the following case:

$ ./perl -Ilib/ -E 'my %h = 1..10; say qq{ %h{"1","3"} }'
$ ./perl -Ilib/ -E 'my %h = 1..10; say qq{ @h{"1","3"} }'
 2 4

Probably it should be left alone as the following doesn't work:

$ ./perl -Ilib/ -E 'my %h = 1..10; say qq{ %h }'

Enabling interpolation will probably cause troubles.

Best regards, Ruslan.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About