Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Reverse in scalar context

by Abigail (Deacon)
on Jul 12, 2001 at 01:12 UTC ( #95855=note: print w/ replies, xml ) Need Help??


in reply to Re: Reverse in scalar context
in thread Reverse in scalar context

What do you mean with "prints nothing"? What are you trying to print? Note that you are trying to eval the string sub which is a syntax error:

$ perl -w $b = "bus"; eval reverse $b; print $@; __END__ syntax error at (eval 1) line 2, at EOF
And if the code doesn't compile, eval will return undef.

-- Abigail


Comment on Re: Reverse in scalar context
Select or Download Code
Re: Re: Reverse in scalar context
by John M. Dlugosz (Monsignor) on Jul 12, 2001 at 01:15 UTC
    If you read the post I was replying to, you'd know that I was not trying to print anything! Rather, I was pointing out this very problem, albeit more subtly, in the original node. I'm quite aware of what it does--I crafted it specifically to do that, yet with a real word might not be immediatly obvious.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2014-10-23 02:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (123 votes), past polls