Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Version control system for the laziest of the lazy

by goibhniu (Hermit)
on Apr 07, 2011 at 15:42 UTC ( #898095=note: print w/ replies, xml ) Need Help??


in reply to Version control system for the laziest of the lazy

++

First thing I tried was:

C:\chas_sandbox\PM>bak.pl *.pl Copy failed: No such file or directory at C:\chas_sandbox\PM\bak.pl li +ne 34.

How about glob?

for my $file (@ARGV) { for my $globfile (glob($file)) { copy($globfile, "backup/${globfile}_$date") or die "Copy faile +d: $!"; } }

now I get:

C:\chas_sandbox\PM>bak.pl *.pl C:\chas_sandbox\PM>


#my sig used to say 'I humbly seek wisdom. '. Now it says:
use strict;
use warnings;
I humbly seek wisdom.


Comment on Re: Version control system for the laziest of the lazy
Select or Download Code
Re^2: Version control system for the laziest of the lazy
by toolic (Chancellor) on Apr 10, 2011 at 15:44 UTC
    Excellent. This seems to make up for one of the many shortcomings of the MS-DOS shell.
Re^2: Version control system for the laziest of the lazy
by Corion (Pope) on Apr 10, 2011 at 15:52 UTC

    Let me recommend bsd_glob from File::Glob. It understands and properly treats whitespace in path and filenames, something that plain Perl glob does not (unless you start quoting things).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://898095]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (18)
As of 2014-10-31 19:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (223 votes), past polls