develooper Front page | perl.perl6.users | Postings from February 2019

Re: Start reading at a specific index?

Thread Previous | Thread Next
From:
Shlomi Fish
Date:
February 2, 2019 11:43
Subject:
Re: Start reading at a specific index?
Message ID:
20190202131655.0661b887@telaviv1.shlomifish.org
On Sat, 2 Feb 2019 01:08:39 -0800
ToddAndMargo via perl6-users <perl6-users@perl.org> wrote:

> Hi All,
> 
> Is there a way to modify this to start reading at
> a specific index?  And include how many bytes (3000000)
> to read as well?
> 
>       my $FileHandle     = open( $FileName, :bin, :ro );
>       my Buf $BinaryFile = $FileHandle.read( 3000000 );
> 
> Many thanks,
> -T

See https://docs.perl6.org/routine/seek .


-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
http://is.gd/i5eMQd - Emma Watson’s Interview for a Software Dev Job

Q2: Busy people are unproductive. We are very productive and so we’re never
busy.
    — http://www.shlomifish.org/humour/Star-Trek/We-the-Living-Dead/

Please reply to list if it's a mailing list post - http://shlom.in/reply .

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About