Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re^2: Open Files in Unix

by Fletch (Chancellor)
on Oct 08, 2008 at 18:09 UTC ( #716060=note: print w/ replies, xml ) Need Help??

in reply to Re: Open Files in Unix
in thread Open Files in Unix

You still haven't fixed the quoting to backticks on your second find command like ikegami pointed out in the very first reply.

Addendum: And if you bothered checking the return value from open on the next line and printing out the error message you might have noticed this yourself . . .

Continuing: And trying to read from a filehandle you've opened for writing (well, we'll presume that you eventually correct the other errors to that point) with the line @array1 = <FILE> after the unchecked open is meaningless. You either need to open the file for reading and writing and do some seek magic to rewind it, or (more simply) write the updated contents to a new file and rename over the original.

The cake is a lie.
The cake is a lie.
The cake is a lie.

Comment on Re^2: Open Files in Unix
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2015-11-28 18:28 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (743 votes), past polls