in reply to Re^2: Generating a range of Unicode characters
in thread Generating a range of Unicode characters

Thanks, both of you. The following produces the output I am expecting.

perl -e '$a=join("",map ({chr} 0xdf .. 0x0101)); print "$a\n";'

I guess there is no way to do the Unicode equivalent of 'A' .. 'Z' instead.

Is there some way to skip the map() or chr() functions?

Replies are listed 'Best First'.
Re: Is skipping map() and chr() possible?
by hippo (Archbishop) on Nov 16, 2017 at 09:33 UTC
    Is there some way to skip the map() or chr() functions?

    Why would you want to skip them? Any why them but not join? Seems rather arbitrary.

    You'll need chr however you go about this and it is not a difficult fuction to understand. map can be avoided but you'll still need some sort of iterative/looping structure. eg:

    perl -e 'print chr for 0xdf .. 0x0101, 0xa';

    That's with *nix EOL.

Re: Is skipping map() and chr() possible?
by Laurent_R (Canon) on Nov 16, 2017 at 08:19 UTC
    Is there some way to skip the map() or chr() functions?
    Probably not. The 0xdf .. 0x0101 construct is just a range of numbers, you need, one way or another, to convert these numbers into characters.