in reply to Re: Renaming all files in a directory -- perl -n -p and empty files oneliner
in thread Renaming all files in a directory
They don't, but that part of code is not exposed to us to insert our own code into. Or is it?
#!/usr/bin/perl -n use warnings; use strict; { package File::ShowName; use Tie::Scalar; use parent -norequire => 'Tie::StdScalar'; sub FETCH { print STDERR "Opening ${ $_[0] }.\n"; ${ $_[0] } } } BEGIN { tie $ARGV, 'File::ShowName' } print;
|
|---|