Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: pass one or more directories into a file and use that as INPUT to a called script

by tybalt89 (Prior)
on Aug 13, 2020 at 16:17 UTC ( #11120688=note: print w/replies, xml ) Need Help??


in reply to pass one or more directories into a file and use that as INPUT to a called script

Were you looking for something like this?

#!/usr/bin/perl use strict; use warnings; my $runTest = 'one.d,ants,mail,3chess.pl,two.d'; sub dive { map { -d $_ ? dive( glob "$_/*" ) : $_ } @_ } my @files = map { dive($_) } split /,/, $runTest; print "$_\n" for @files;
  • Comment on Re: pass one or more directories into a file and use that as INPUT to a called script
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11120688]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2020-10-28 03:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (259 votes). Check out past polls.

    Notices?