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 perlfan (Vicar)
on Aug 13, 2020 at 14:58 UTC ( [id://11120682]=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

>it is just printing testDirectory1 and testDirectory2 line by line inside <testFile>

Well, looks like that's what you told it to do here:

print {$RF} map { "$_\n" } split(/,/, $runTest);

If you want to get the contents of the directories, you'll need to checkout opendir or File::Find (and friends).

For the best line of help, post more code for context. Particularly your options processing. And be sure to use strict; and use warnings;.

Oh,

open (my $RF, '>', 'testFile');
Did you mean,
open (my $RF, '>', $testFile);

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-03-28 08:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found