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

Re: Unable to split this line of code (printf warning)

by monarch (Priest)
on Nov 24, 2005 at 22:43 UTC ( [id://511551]=note: print w/replies, xml ) Need Help??


in reply to Unable to split this line of code (printf warning)

I tried this out myself, and it's a new one to me, silly Perl!

Your statement works fine if you ensure there's no space between the function name and the opening parenthesis. i.e: "printf(" works but "printf (" fails.

I'd say this is a shortcoming in the perl interpreter. You were using valid syntax all along.. it's just that it seems perl doesn't like the whitespace in this situation..

Replies are listed 'Best First'.
Re^2: Unable to split this line of code (printf warning)
by chromatic (Archbishop) on Nov 25, 2005 at 01:45 UTC

    It's not a shortcoming of the interpreter; it's the ambiguousness of using the same symbols for two different purposes. It can't read your mind to know whether you want to group an expression with parentheses for precedence purposes or use the parentheses to group the arguments to the operator.

    I suggest not using a space between a function name and the opening parenthesis.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-19 02:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found