Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2020-05-25 09:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (145 votes). Check out past polls.

    Notices?