Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://716060]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (13)
As of 2017-11-21 15:47 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (304 votes). Check out past polls.