in reply to Re^2: In my it is printing in the else i want to get output for the for loop in linux.
in thread In my it is printing in the else i want to get output for the for loop in linux.

Well one would hope that "in words" means showing some examples in order to fully describe what is supposed to happen. I really have no idea from the OP's current code this thing is supposed to do. I will add "show some actual examples of match and no match" in future such requests.

Test::More is fine, but something even easier could be fine too. The OP could get his point across by flushing this out with more examples...

use strict; use warnings; #wild ass guess foreach (qw( /HD123FA45 /HD123FA45/anything anything/HD123FA45 /FC/blah /LM /H4p5 asdf/blah/x/H4p9 /asdf7758 )) { print "$_ "; if (/\/(H|HD)[0-9]{1,3}(FA|FC|C|P|CO)[0-9]{1,3}$/i or /\/(FC|LM|CO)/i) { print "\t...match!\n"} else {print "\t...no match!\n";} } __END__ /HD123FA45 ...match! /HD123FA45/anything ...no match! anything/HD123FA45 ...match! /FC/blah ...match! /LM ...match! /H4p5 ...match! asdf/blah/x/H4p9 ...match! /asdf7758 ...no match!
  • Comment on Re^3: In my it is printing in the else i want to get output for the for loop in linux.
  • Download Code