1#!/usr/local/bin/perl 2 3use strict; 4 5use Fcntl; 6 7# copy-if-different.pl 8 9# Copy to the destination if the source is not the same as it. 10 11my @filelist; 12 13foreach my $arg (@ARGV) { 14 $arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob...
| 1#!/usr/local/bin/perl 2 3use strict; 4 5use Fcntl; 6 7# copy-if-different.pl 8 9# Copy to the destination if the source is not the same as it. 10 11my @filelist; 12 13foreach my $arg (@ARGV) { 14 $arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob...
|
15 foreach (glob qq("$arg"))
| 15 $arg = qq("$arg") if ($arg =~ /\s/); # compensate for bug in 5.10... 16 foreach (glob $arg)
|
16 { 17 push @filelist, $_; 18 } 19} 20 21my $fnum = @filelist; 22 23if ($fnum <= 1)
--- 55 unchanged lines hidden --- | 17 { 18 push @filelist, $_; 19 } 20} 21 22my $fnum = @filelist; 23 24if ($fnum <= 1)
--- 55 unchanged lines hidden --- |