Hey all. I'm trying to write a script that will append a few chars (example _fr) to the end of the "prefix" filename. All the filenames I need to change end with .properties. I need to have this script descend into all subdirs of the dir specified at the command line.
I can't seem to understand how to use a variable with the find(\&wanted syntax from File::Find. I suppose I can substitute "wanted" with &$whatever ? So far it does not work. use strict; use warnings; use Getopt::Std; use vars qw/ %opt /; my $args = 't:s:a:'; getopts( "$args", \%opt ); my $targetdir = $opt{t}; my $searchstring = $opt{s}; my $append = $opt{a}; find(\&searchstring, $targetdir); sub wanted { print; -- Monkeys are superior to men in this: when a monkey looks into a mirror, he sees a monkey. -- Malcolm De Chazal ----- End forwarded message ----- -- Monkeys are superior to men in this: when a monkey looks into a mirror, he sees a monkey. -- Malcolm De Chazal -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/