File: demo_simple.pl

package info (click to toggle)
libinline-files-perl 0.71-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 232 kB
  • sloc: perl: 617; xml: 12; makefile: 7
file content (43 lines) | stat: -rwxr-xr-x 415 bytes parent folder | download | duplicates (3)
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
36
37
38
39
40
41
42
43
use Inline::Files;

my $here;

# etc.
# etc.
# etc.

while (<FOO>) {
	print "FOO> $_";
}

my $rememBAR = $BAR;

while (<BAR>) {
	print "BAR> $_";
}


open BAR, "+<$rememBAR" or die $!;
print BAR "Ta-da!\n";

seek BAR, 0, 0;
while (<BAR>) {
	print "BAR> $_";
}

print "done\n";

__FOO__
This is a virtual file at the end
of the data

__BAZ__
This is BAZ

__BAR__
This 
is BAR

__FOO__
This is yet another 
such file