Gossamer Forum
Home : General : Perl Programming :

copy lines x to y of file

Quote Reply
copy lines x to y of file
I need copy lines of file hosted in other server..

Ex: copy line 100 to 200 of 5000 the file teste.html

function get of LWP::Simple permited copy full teste.html, correct? I need only line 100 to 200...

help
Quote Reply
Re: [Zort] copy lines x to y of file In reply to
@file = get($url);

@wanted = @file[99..199];

I assume it pushes the data into @file line by line....I can't remember. If so the code above will work.
Quote Reply
Re: [Paul] copy lines x to y of file In reply to
get($url) is function.

function return 1 value

get($url) return html in "one line".

@file contain full html in $file[0].

$file[1] is null :(