in reply to eval NoOp on cmd.exe line expr
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.rename ($was, $_) unless $was = $_;
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.
|
---|
In Section
Seekers of Perl Wisdom