in reply to avoid writing 'use utf8' in every script

Teach your editor to add "use utf8;" whenever you create a ".pl" file.

  • Comment on Re: avoid writing 'use utf8' in every script

Replies are listed 'Best First'.
Re^2: avoid writing 'use utf8' in every script
by reqnode (Novice) on Feb 03, 2014 at 16:27 UTC
    I am old jerk and love creating programs with less code possible to run on 2 MB RAM

      That is a sentiment I have a lot of sympathy for, but then, would it not be better to stick to ASCII (7 bits)?

        No, my boss requires every source code to be strictly in japanese

      use utf8; does not use result in any code.

      >perl -MO=Concise,-exec -e"use utf8; $x='abc';" 1 <0> enter 2 <;> nextstate(main 7 -e:1) v:U,{ 3 <$> const[PV "abc"] s 4 <#> gvsv[*x] s 5 <2> sassign vKS/2 6 <@> leave[1 ref] vKP/REFC -e syntax OK

      It has a compile-time effect.