File: 09_heredoc.code

package info (click to toggle)
libppi-perl 1.215-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,820 kB
  • sloc: perl: 12,129; makefile: 8
file content (35 lines) | stat: -rw-r--r-- 282 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Bareword
print <<END;
Foo
END

# Literal
print <<'END';
Foo
END

# Interpolate
print <<"END";
Foo
END

# Command
print <<`END`;
Foo
END

# No lines
print <<END;
END

# Multiple
print <<FIRST, <<SECOND;
Foo
FIRST
Bar
SECOND

# End of document (missing newline)
print <<END;
Foo
END