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 ( [id://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.

Replies are listed 'Best First'.
Re^2: Version control system for the laziest of the lazy
by Corion (Patriarch) 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).

Re^2: Version control system for the laziest of the lazy
by toolic (Bishop) 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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-03-19 07:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found