Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Alternate node title: "You can't really call this version control"

  • Can't afford Perforce?
  • Too busy to set up a CVS pserver?
  • Too lazy to create an RCS directory?
  • No need for branches or tags?
  • No desire to share your files?
  • Don't really care about commenting on your revision?

If you answered "yes" to the above, then have I got the version control system for you!

It's easy to install and easy to use because it has NO features!

Clearly, this is not meant to be a replacement for your favorite fancy software. I use it when I'm in rapid hack experiment mode and I don't want to clutter up my real version control system with versions that should be thrown away.

It only uses Core modules and works on Unix and Windows. The POD says it all:

=head1 NAME B<bak> - Make a backup copy of a file =head1 SYNOPSIS bak file ... =head1 DESCRIPTION A uniquely-named backup copy of a file is created. The file is written to a subdirectory named C<backup>, which will be created if it does not yet exist. The name of the backup copy is the original filename with a date and timestamp appended to it. Multiple files may also be specified. Output: A file to subdirectory named C<backup>. Example1: bak file.txt Example2: bak *.doc =cut use warnings FATAL => 'all'; use strict; use File::Copy; use POSIX qw(strftime); die "Error: No files specified\n" unless @ARGV; mkdir 'backup'; my $date = strftime('%y%m%d_%H%M%S', localtime); for my $file (@ARGV) { copy($file, "backup/${file}_$date") or die "Copy failed: $!"; }

Update: Apr 28, 2011: If you want to preserve file permissions and you have File::Copy version 2.15 or later, change copy to cp.

In reply to Version control system for the laziest of the lazy by toolic

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others wandering the Monastery: (6)
    As of 2017-10-20 23:44 GMT
    Find Nodes?
      Voting Booth?
      My fridge is mostly full of:

      Results (268 votes). Check out past polls.