projects
/
p5sagit/p5-mst-13.2.git
/ blame
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blob
|
history
|
HEAD
perl 3.0 patch #11 patch #9, continued
[p5sagit/p5-mst-13.2.git]
/
eg
/
rename
Commit
Line
Data
a687059c
1
#!/usr/bin/perl
2
3
($op = shift) || die "Usage: rename perlexpr [filenames]\n";
4
if ($#ARGV < 0) {
5
@ARGV = <stdin>;
6
chop(@ARGV);
7
}
8
for (@ARGV) {
9
$was = $_;
10
eval $op;
11
die $@ if $@;
12
rename($was,$_) unless $was eq $_;
13
}