in reply to Screen buffering mystery
If you want to keep the meanings of the various line numbers intact in the code, but avoid creating independent variables for that purpose, you could do something like the following:my @lines = map{"$_\n"} split /\r\n/, $plain_text; print @lines[10,11,13,17,18,20];
use strict; use LWP::Simple; my %info_lines = ( title => 10, timestamp => 11, shoppers => 13, num_orders => 17, gross_sales => 18, avg_size => 20, ); my $url = "http://www.visionforum.com/admin/avantgo.asp"; my $page_content = get($url); (my $plain_text = $page_content) =~ s/<[^>]*>//gs; my @lines = map{"$_\n"} split /\r\n/, $plain_text; print $lines[$_] for sort values %info_lines;
--
I'd like to be able to assign to an luser
|
---|