Skip to content

Instantly share code, notes, and snippets.

@nicomen
Last active December 21, 2016 21:45
Show Gist options
  • Save nicomen/fe4732cf7033442e04139ceb632749ef to your computer and use it in GitHub Desktop.
Save nicomen/fe4732cf7033442e04139ceb632749ef to your computer and use it in GitHub Desktop.
Slightly different error output string eval vs parse file vs latin1 input
$ perl -wle 'my $é = 5'
Can't use global $� in "my" at -e line 1, near "my $�"
Unrecognized character \xA9; marked by <-- HERE after my $�<-- HERE near column 6 at -e line 1.
$ perl -wle 'eval q/my $é = 5/ or die $@'
Unrecognized character \xA9; marked by <-- HERE after my $�<-- HERE near column 6 at (eval 1) line 1.
$ perl -wle 'eval qq/my \$\xC3 = 5/ or die $@'
Can't use global $� in "my" at (eval 1) line 1, near "my $� "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment