You told us what the output needs to be in one case but not what the input is, or what it should do in the general case. I suggest that you start with this, and then modify it once you've figured out what your real requirements are:
print " chapter 1,chapter 2,chapter 3\n";
You can't expect us to read your mind.
In reply to Re: how to fetch 1,2,3, from chapter
by DrHyde
in thread how to fetch 1,2,3, from chapter
by virudinesh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |