> On Mar 24, 2015, at 7:27 AM, Anirban Adhikary <anirban.adhik...@gmail.com> > wrote: > > Hi Jim > > In your code there is some hard coded value [ /RXMOI:MO=RXOTRX > But I can't put any hard coded value since I use this code as a function and > pass the filename as an argument. > As you can see in my code there is no hard coded value.
You can modify the regular expression used to extract the sort values depending upon the circumstances under which your function will be used. I was just giving an example of how to combine all of the individual steps into one command. I based the regex I used on the sample data you had provided. If you have any lines that do not match the regular expression, then the method I showed will produce errors, as there will be no extracted values to sort on for those lines. If I were writing a general purpose function, then I would not combine the steps as I have shown, but keep them as separate functions with any necessary error-checking and ilne filtering. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/