# assuming DATA pipe opened for reading... # declare my $current; # begin local code block { # locally define $/ local $/ = undef; # slurp $current = ; # end local code block } #### # open open (DATA,"/path/to/webpage.htm") || die "Can't open page - $!"; # slurp $current = join '', (); # close close(DATA); # match $current =~ /\n(.*?)\ns; # store my $match = $1;