Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: Input Output Question

by vinoth.ree (Parson)
on Jul 15, 2013 at 05:13 UTC ( #1044273=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Input Output Question
in thread Input Output Question

Simply use the foreach loop to parse each file and redirect the output to output directory

For Example:
my $output_dir = 'output/'; foreach my $file (@files) { print $file . "\n"; #Parse the file here open(FH, '>>', $output_dir.$file ) or die "Unable to open the +file: $!"; print FH "Output goes into output directory with the same file + name\n"; close(FH); }

All is well


Comment on Re^3: Input Output Question
Select or Download Code
Re^4: Input Output Question
by perlmonk007 (Novice) on Jul 15, 2013 at 05:59 UTC

    I tried it that way, it doesnt work, The three folders code, input and output are in the same level in the directory structure (The folders are in a single folder ) and I need to output the result of the pipeline into the output folder with the names unchanged. sadly the code you provided is not working.

      hi perlmonks007, could you please post the code you have tried ? so that I can assist you better.


      All is well

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (11)
As of 2014-12-26 19:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (174 votes), past polls