File: demo_persistence_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 (18 lines) | stat: -rwxr-xr-x 258 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use Inline::Files;
use Data::Dumper;

eval join "", <CACHE>;

print "\$var was '$var'\n";
while (<>) {
	chomp;
	$var = $_;
	print "\$var now '$var'\n";
}

seek CACHE, 0, 0;
print CACHE Data::Dumper->Dump([$var],['var']);

__CACHE__
$var = 'Original value';