Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: eval NoOp on cmd.exe line expr

by kennethk (Abbot)
on Mar 13, 2017 at 23:36 UTC ( #1184502=note: print w/replies, xml ) Need Help??


in reply to eval NoOp on cmd.exe line expr

rename ($was, $_) unless $was = $_;
will always evaluate true because because you are using the assignment operator (=) not the string equivalence operator (eq). You should have gotten a warning about that one running the posted code.

Reading Basic debugging checklist may be helpful. An essential element is use print/say and/or Data::Dumper to make sure variables contain what you think they should.


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2020-10-23 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (236 votes). Check out past polls.

    Notices?