Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: can this be turned into a compile-time error?

by QM (Parson)
on Mar 11, 2005 at 18:54 UTC ( #438751=note: print w/replies, xml ) Need Help??


in reply to Re: can this be turned into a compile-time error?
in thread Should chomping a constant always raise an error?

Can modify somehow be declared to only take a modifiable parameter, so that we can have a compile-time error (as happens with the core chomp)?
Playing Devil's Advocate, will this work?
chomp(foo(",",@list))
Don't know? How about this?
chomp(join(",",@list))
It seems, off the top of my naive head, that the argument to chomp would have to be an l-value to be guaranteed to be modifiable.

Is that what you want?

-QM
--
Quantum Mechanics: The dreams stuff is made of

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2022-05-23 12:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (82 votes). Check out past polls.

    Notices?