Hi Kavita,

You may try unpack (http://perldoc.perl.org/functions/unpack.html)

Also read these: http://www.perlmonks.org/?node_id=308607,
http://stackoverflow.com/questions/1083269/is-perls-unpack-ever-faster-than-substr


On Wed, Apr 10, 2013 at 3:46 PM, kavita kulkarni
<kavitahkulka...@gmail.com>wrote:

> Hi All,
>
> 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 millions of lines.
> If I use perl in-built function substr() to data extraction, it has huge
> impact on performance.
> Is there any alternative for this?
>
> Thanks in advance.
>
> Cheers,
> Kavita
>



-- 
Regards,
Chankey Pathak <http://www.linuxstall.com>

Reply via email to