Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: character-by-character in a huge file

by Anomynous Monk (Scribe)
on Apr 08, 2004 at 18:17 UTC ( [id://343689]=note: print w/replies, xml ) Need Help??


in reply to character-by-character in a huge file

I think you need to say more about what you need to do with the first and last characters. Can you ignore 500-char ranges spanning the > marks? Are you looking for some literal first character? If the answers are yes, something like this should go pretty quickly, using a regex to go through the buffer one character at a time:
$/ = ">"; while (my $line = <>) { while ($line =~ m/x(?=.{498}(.))/gs) { my $from_x_500_chars = $1; } }
If you do try different methods suggested, it would be nice if you posted a summary of results.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://343689]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-24 08:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found