Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by choroba (Abbot)
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
Re^2: Using perl to extract data from multiple .txt files
by MidLifeXis (Prior) 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 imbibing at the Monastery: (11)
As of 2014-12-19 17:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (90 votes), past polls