Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (18)
As of 2014-07-10 14:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (212 votes), past polls