Re: Any alternative for substr() function

2013-04-12 Thread Charles DeRykus
On Fri, Apr 12, 2013 at 4:23 AM, kavita kulkarni wrote: > Thanks all, got many ideas from you.. > > My script took ~7 min to run with data file of ~50,000 lines with > substr()/unpack() enabled and same script took ~2 min after disabling > substr()/unpack(). > ... > > For "Devel::NYTProf", I need

Re: Any alternative for substr() function

2013-04-12 Thread Michael Rasmussen
On Fri, Apr 12, 2013 at 04:53:52PM +0530, kavita kulkarni wrote: > Thanks all, got many ideas from you.. > > My script took ~7 min to run with data file of ~50,000 lines with > substr()/unpack() enabled and same script took ~2 min after disabling > substr()/unpack(). No one has asked what kind of

Re: Any alternative for substr() function

2013-04-12 Thread Paul Johnson
On Wed, Apr 10, 2013 at 03:46:00PM +0530, kavita kulkarni wrote: > Hi All, Hello. > I want to extract certain char sets (e.g. char 4 to 9, char 11 to 14 etc.) > from each line of my file and store them in separate variables for further > processing. > My file size can vary from thousand to millio

Re: Any alternative for substr() function

2013-04-12 Thread Rob Dixon
On 12/04/2013 12:23, kavita kulkarni wrote: Thanks all, got many ideas from you.. My script took ~7 min to run with data file of ~50,000 lines with substr()/unpack() enabled and same script took ~2 min after disabling substr()/unpack(). That led me to the conclusion that substr/unpack is taking

Re: Any alternative for substr() function

2013-04-12 Thread kavita kulkarni
Thanks all, got many ideas from you.. My script took ~7 min to run with data file of ~50,000 lines with substr()/unpack() enabled and same script took ~2 min after disabling substr()/unpack(). That led me to the conclusion that substr/unpack is taking maximum of my time (and that I should reduce).