Make a backup file: Difference between revisions

m
→‎{{header|Perl 6}}: Alphabets. how do they work?
(→‎{{header|Perl 6}}: Add a Perl 6 example)
m (→‎{{header|Perl 6}}: Alphabets. how do they work?)
Line 327:
 
AMSDOS has automatic one-level backups which also work from Locomotive BASIC: If e.g. the file <tt>test.bas</tt> is saved, the data gets written to <tt>test.$$$</tt>. When the file is closed a preexisting <tt>test.bas</tt> gets renamed to <tt>test.bak</tt> and finally <tt>test.$$$</tt> is renamed to <tt>test.bas</tt>. (These backups affect all file types, not just BASIC source code.)
 
=={{header|PicoLisp}}==
PicoLisp makes use of external commands as much as possible (at least for not time-critical operations), to avoid duplicated functionality.
<lang PicoLisp>(let Path (in '(realpath "foo") (line T))
(call 'mv Path (pack Path ".backup"))
(out Path
(prinl "This is the new file") ) )</lang>
 
=={{header|Perl 6}}==
Line 373 ⟶ 366:
# Optional parameters can be in any order, in any combination.
backup 'myfile', :follow-symlinks, :limit(2), :ext('bak');</lang>
 
=={{header|PicoLisp}}==
PicoLisp makes use of external commands as much as possible (at least for not time-critical operations), to avoid duplicated functionality.
<lang PicoLisp>(let Path (in '(realpath "foo") (line T))
(call 'mv Path (pack Path ".backup"))
(out Path
(prinl "This is the new file") ) )</lang>
 
=={{header|Pike}}==
10,327

edits