newspaint

Documenting Problems That Were Difficult To Find The Answer To

USA And UK Keyboard Differences That Affect Perl Developers

Main Differences

Mistakes made by British and Irish using USA (ANSI layout) keyboards:

  • The UK # key is located where the USA [enter] key would be
  • The UK ~ key is located where the USA [enter] key would be
  • The UK @ key is located where the USA ” key would be
  • The UK ” key is located where the USA @ key would be
  • The UK \ key is located where the USA [left shift] key would be
  • The UK [enter] key extends over where the USA \ key would be

Mistakes made by Indians, Australians, Canadians, Hong Kong residents, New Zealanders, South Africans, Malaysians, Singaporians and Philippinos using UK (ISO layout) keyboards:

  • The USA # key is located where the UK £ key would be
  • The USA ~ key is located where the UK ¬ key would be
  • The USA @ key is located where the UK ” key would be
  • The USA ” key is located where the UK @ key would be
  • The USA \ key is located where the UK [enter] key would be
  • The USA left shift key extends over where the UK \ key would be
  • The USA [enter] key extends over where the UK # key would be

Why Is This A Big Deal?

For most modern-day computer users the special characters on the keyboard are not important. After all the numbers and letters are in the same place. But for programmers the differences are major because special characters are used frequently throughout programs – particularly in Perl.

In Perl:

  • The # symbol is used for commenting out all or part of a line
  • The ~ symbol is used in regular expression syntax, e.g. $text =~ m/\d+/
  • The @ symbol is used for naming arrays
  • The ” symbol is used for delimiting interpolated strings
  • The \ symbol is used for escaping characters and character classes in regular expressions

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: