summaryrefslogtreecommitdiff
path: root/test/lisp/progmodes/cperl-mode-resources/extra-delimiters.pl
blob: 4c59ad6249a18def151bd4f9686f05ef28a56b84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use utf8;

my $string_with_strange_delimiters  = q«a»;
my $printed = 0;

label:
print $string_with_strange_delimiters;
$printed = 1;

# With cperl-extra-delimiters-mode=on the previous lines are a label
# and a print statement.  This line here is a comment.  Without
# cperl-extra-delimiters-mode, all this is part of the variable
# declaration.

# Perl will print hist an "a" if called like this:
#   perl -M5.040 extra.pl
# ...and, if called without that -M switch,
#   perl extra.pl
# will print everything until here: «;

$printed  or print $string_with_strange_delimiters;

my $sanity = "eventually recovered.";