Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: appending is not done

by tlm (Prior)
on Aug 25, 2005 at 10:02 UTC ( [id://486494]=note: print w/replies, xml ) Need Help??


in reply to appending is not done

What you have written should work. What's your shell? zsh can give confusing results; in the unlikely event that this is what you're using, try adding a "\n" at the end of the string you're appending.

BTW, you should check the return value of your open. (And to be excruciatingly correct, you should check the return value of your close too.) Also the parentheses in your print statement are not doing anything for you.

open FD, '>>/users/smisra/test4.pl' or die "open failed: $!\n"; print FD $string; close FD or die "close failed: $!\n";

the lowliest monk

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2025-06-19 13:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.