S
sheinrich
Why does this line work as expected
print qw(A B C D E F G H)[split //, '76543210'], "\n"; # outputs
"HGFEDCBA"
but this one doesn't compile:
print (split //, 'ABCDEFGH')[split //, '76543210'], "\n"; # syntax
error at ..., near ")["
???
Is there a tweak to make the 2nd version work as well?
I tried some combinations with @(), @{} but didn't get it working.
Eplanation and remedy would both be appreciated.
TIA, Steffen
print qw(A B C D E F G H)[split //, '76543210'], "\n"; # outputs
"HGFEDCBA"
but this one doesn't compile:
print (split //, 'ABCDEFGH')[split //, '76543210'], "\n"; # syntax
error at ..., near ")["
???
Is there a tweak to make the 2nd version work as well?
I tried some combinations with @(), @{} but didn't get it working.
Eplanation and remedy would both be appreciated.
TIA, Steffen