Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

by choroba (Cardinal)
on Nov 14, 2012 at 15:27 UTC ( [id://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. }
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1003834]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-03-19 11:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found