geertvc has asked for the wisdom of the Perl Monks concerning the following question:
The variables $harvester and $flavour are passed as parameters on the command line when calling the Perl script.my @codeOutputDirs = ( "output/$harvester$flavour/layout", "output/$harvester$flavour/tabview", "output/$harvester$flavour/udw", "output/$harvester$flavour/values", "output/$harvester$flavour/udw/service", "output/$harvester$flavour/udw/cfg" );
And this, for each and every element in the array.make_path "output/$harvester$flavour/layout"; unlink glob "output/$harvester$flavour/layout/*.*";
The first command, make_path $_; is fine.for (@codeOutputDirs) { make_path $_; unlink glob $_/*.*; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Appending /*.* to default Perl variable $_
by Athanasius (Archbishop) on May 26, 2020 at 07:47 UTC | |
by geertvc (Sexton) on May 26, 2020 at 16:32 UTC | |
|
Re: Appending /*.* to default Perl variable $_
by jwkrahn (Abbot) on May 26, 2020 at 07:44 UTC |