Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Using perl to extract data from multiple .txt files

by choroba (Canon)
on Nov 14, 2012 at 15:27 UTC ( #1003834=note: print w/ replies, xml ) Need Help??


in reply to Using perl to extract data from multiple .txt files

open my $OUT, '>', 'output.txt' or die "output: $!"; for my $file (glob 'dir/*.txt') { # Your old code here. Remove opening the output file. }
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re: Using perl to extract data from multiple .txt files
Download Code
Replies are listed 'Best First'.
Re^2: Using perl to extract data from multiple .txt files
by MidLifeXis (Monsignor) on Nov 14, 2012 at 15:46 UTC

    Careful with this one to make sure that you (the OP, not choroba) do not process the text file opened above.

    --MidLifeXis

      True. I added a path to the code (I had planned to, but forgot).
      لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2015-07-29 10:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls