I am new to Perl and am trying to modify a script. What I have is an if statement that is checking for a single condition like so:
if {$filename ne ".txt"} {$merr=1;$e2=1;}
What I would like to do is something like this:
if {$filename ne ".txt"} || {$filename ne ".TXT"} {$merr=1;$e2=1;}
When I try this I get this error:
syntax error at line 24, near "if {"
I hope that makes since, currently the script is over looking the upper case extensions. I am not looking to re-invent the wheel here, just add this case and move on. Thanks in advance for any pointers.
Brian
if {$filename ne ".txt"} {$merr=1;$e2=1;}
What I would like to do is something like this:
if {$filename ne ".txt"} || {$filename ne ".TXT"} {$merr=1;$e2=1;}
When I try this I get this error:
syntax error at line 24, near "if {"
I hope that makes since, currently the script is over looking the upper case extensions. I am not looking to re-invent the wheel here, just add this case and move on. Thanks in advance for any pointers.
Brian