Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: tr operator in eval -- updated (updated)

by AnomalousMonk (Bishop)
on Sep 27, 2020 at 07:03 UTC ( #11122260=note: print w/replies, xml ) Need Help??


in reply to Re^2: tr operator in eval -- updated
in thread tr operator in eval -- updated

I missed the necessity of ... having ; characters to terminate both the expression to be eval'ed and also the eval statement itself.

A ; (semicolon) is not necessary to terminate the last statement in a file, block, or an eval string derived from an expression; if any of these have only a single statement, no semicolon termination at all is necessary. The eval statement itself must be ;-terminated because other statements follow it.

Update: Another, more general and perhaps better way to put it is that every statement must be terminated, either by a semicolon or by the end of the block, file or eval string containing it. And, of course, extra semicolons have no effect.


Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2021-06-20 18:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (95 votes). Check out past polls.

    Notices?