Hello fellow monks,
I am in the process of writing a weblog page for my website which will be driven by Perl. Currently, I have the program slurp in the weblog file (plain-text, with a record delimiter) and spit the chunks back out.
Slurping is a sin, and I wish to become enlightened. I want to rewrite the code (it's not yet live) so the weblog isn't slurped from a file. I'm considering using a 'while' loop, however, I'm not sure how I can keep track of the file. I have an "offset" modifier and a "span" modifier, which allows users to start at a point in the log and read through however many entries they requested.
Currently, I have a $count variable in the 'while' loop, and some 'if' statements which determine which entries are pulled. I am under the assumption that I can use $_ to read from <WEBLOG> and $. to get the current entry (as i would in $weblog[$currententry]).
Is this the most efficient form of reading from a file? Any suggestions?
a somewhat lost John J ReiserIn reply to Anti-slurp weblog by newrisedesigns
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |