Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Useless use of string eq

by jrsimmon (Hermit)
on Dec 06, 2007 at 16:03 UTC ( #655441=note: print w/replies, xml ) Need Help??


in reply to Useless use of string eq

To summarize some of the answers above:

1. Why is this a useless use?
Because eq is used to compare things. You are trying to use it to assign a value. You muse use = for that.

2. What is a void context?
{$cust eq "SMC";} is a void context, because you are performing a comparison (see 1.) but not doing anything with the result. There is not context for the compare, hence it is a void (empty) context.

3. What can I do to do this better?
The first reply Re: Useless use of string eq to your post by Fletch (++) explains best how to rewrite your code.

Perhaps you should ask him about the whole children bearing thing...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2022-01-26 08:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (69 votes). Check out past polls.

    Notices?