in reply to Print multiple value from file

That's because you search for 'ssId' twice! You'll have to change that if you want it to do something else.

if ($_= ~/ssId=\s*?(\S+)/) { ... } if ($_= ~/ssId=\s*?(\S+)/) { ... }