coldmiser has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to get my code to (add one to $filename AND rename a file AND run my Logging routine) OR run my Logging routine.
($filename++ && rename ("E:\\IFMXBKUP\\IFMXBKUP.BAK","E:\\IFMXBKUP\\IF +MXBKUP.$filename.BAK") && &Logging("renaming E:\\IFMXBKUP\\IFMXBKUP.B +AK to E:\\IFMXBKUP\\IFMXBKUP.$filename.BAK")) || &Logging("Cannot ren +ame E:\\IFMXBKUP\\IFMXBKUP.BAK: $!");
So, it has to do all three commands OR just one. Here is the code I have. I'm sure I have to be close, I just can't figure out what I'm doing wrong.
Can someone look at it for me and please tell me the stupid mistake I made (besides writing code for Activestate 5.6.0 or Windows which I have no control over)
Thanks for your assistance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ANDs and ORs
by Fletch (Bishop) on Apr 04, 2007 at 18:13 UTC | |
|
Re: ANDs and ORs
by ikegami (Patriarch) on Apr 04, 2007 at 18:14 UTC | |
|
Re: ANDs and ORs
by Joost (Canon) on Apr 04, 2007 at 18:18 UTC | |
|
Re: ANDs and ORs
by Anno (Deacon) on Apr 04, 2007 at 18:41 UTC |