Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Getting duplicate file contents in perl

by BillKSmith (Monsignor)
on Sep 13, 2021 at 13:38 UTC ( #11136718=note: print w/replies, xml ) Need Help??


in reply to Getting duplicate file contents in perl

Your output file is already in the directory when you glob so your output file is treated as an input. Move the glob before the open.
my @allFiles = glob("$severityDir/*.txt"); open( my $fh, '>>', $severityFile ) or die "Could not open file '$severityFile' $!";
Bill

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2022-01-21 16:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (59 votes). Check out past polls.

    Notices?