My script will parse the input_file and get all the details which are in the right hand side and generate commands accordingly. Right now this script only runs for one frame. I want to add a one value to the frame sepearted by "," and my script should generate value for both the frames.

Now am trying to learn OOP in perl I am not sure how to create dynaic object and what kind of relationship I have to create.

Your first step should be to pick up a copy of Perl Best Practices and thoroughly read it. It will teach you a lot of the basics that you're missing and will need before writing OO scripts.

Next step is a toss up between fixing your current script based on the knowledge you learned from the PBP book or to first read Modern Perl before rewriting/fixing your script. Modern Perl will introduce you to OO, but there are many other things in there that you should learn before doing OO.

The Switch module that you're using is a source filter module and is known to be buggy and is not recommended to be used in production code.

Likewise, (Larry Wall) the author of the Shell module does not recommend using that module in production code.

Your script is shelling out way too much and using backticks in void context is also a poor practice/habit.

Your script is lacking the usage of the strict pragma, which is not good to leave out and it's using the global -w switch instead of the preferred lexical use warnings; pragma.