Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Loop Through Files and Update Headers

by choroba (Archbishop)
on Mar 05, 2020 at 22:54 UTC ( #11113883=note: print w/replies, xml ) Need Help??


in reply to Loop Through Files and Update Headers

Why do you open the file using open? You don't seem to be using the file handle IN anywhere.

But, when opening it, you correctly specify the path as "Output/$in". You should do the same when tying the file:

tie my @array, 'Tie::File', "Output/$in" or die ... # ~~~~~~~

Otherwise, it just creates a new file in the current directory, populates its first line, and that's it.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2020-06-07 04:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (42 votes). Check out past polls.

    Notices?