Hello again,
In my aplication I have to acces  a lot of times to a web information, but I don't want to die my apllication if a non is_succes and I want to put a message error and waiting the answer of the user if he wants to insist or abort. I don't know if maybe yesterday I drunk too much but today I have no idea.
Can anybody help me ?
I include for you the code of one of them that don't go correctly for this reason, i have to use semaphores or something like this ?
This subroutine is not inside a module that uses any window.
 # -------------------------------------
sub obtenirget {
# -------------------------------------
# permet obtenir la informacio de la direcció web subministrada
 my $llistotal=shift(@_);
 while ($finalitzat==0)
  my $ua = LWP::UserAgent->new;
  my $req = HTTP::Request->new(GET => $llistotal);
  my $res = $ua->request($req);
  if ($res->is_success)
   $contingut = $res->content; 
   $contingut =~ s/\015?\012/\n/g; ##per als salts de HTML
   $contingut =~ s/\015\012?/\n/g; ## per a DOS  
  } else
   if ($intents % 5)
    $texterror="Error No s ha obtingut la llista satisfactoriament ".$res->status_line;