Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: problems with truncate function

by johngg (Abbot)
on Jun 26, 2013 at 09:29 UTC ( #1040741=note: print w/ replies, xml ) Need Help??


in reply to problems with truncate function

What Anonymonk is saying is the || has a higher precedence than or so either write:-

truncate( $fh, 0 ) || die ...

or

truncate $fh, 0 or die ...

Your code is doing:-

truncate $fh, ( 0 || die ... )

which is not what you want!

Cheers,

JohnGG


Comment on Re: problems with truncate function
Select or Download Code
Re^2: problems with truncate function
by david2008 (Scribe) on Jun 26, 2013 at 09:35 UTC
    This post made me perl wiser :-).
    The forum "Seekers of perl wisdom" is really appropriate.
    Thank you all,
    David

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (16)
As of 2014-09-18 18:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (121 votes), past polls