Vyacheslav Karamov wrote: > > How C-style buffer could be implemented in Perl? > I need to download text file into buffer, then find some text in it with > regular expression, > then store some text *before* the match and then search some text with > regular expression again, but starting > from the end of the previous match till the end of the buffer. > Then stored matches should be precessed with another regexps. > > Is it possible?
I'm not clear what is C-style about what you describe. You can read an entire file into memory and process it as a single entity. For details look at perldoc -q "entire file" You may also want to look at the /m, /s and /g qualifiers in perldoc perlre Your description of what you need to do with the file's contents is unclear, but take a look at the @- and @+ built-in arrays in perldoc perlvar HTH, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
