Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 rifling through the Monastery: (8)
As of 2015-07-04 20:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls