Loading ...
Sorry, an error occurred while loading the content.

LWP module, saving file as one continious line..

Expand Messages
  • frankie
    Hi all, Just a quick question... I am using the LWP module to grab a page and save it locally (as $file)... using this: my $return_query =
    Message 1 of 4 , Aug 6 10:42 AM
    • 0 Attachment
      Hi all,

      Just a quick question...

      I am using the LWP module to grab a page and save it locally (as $file)...

      using this:

      my $return_query = "$return_URL?$query_string";
      my $result = getstore( $return_query, $file);
      unless ($result == 200) {
      print "Cannot download $return_URL : HTTP Status = $result\n";
      }

      My question is,, is there any way to get LWP to save that file as one
      line???

      I want to have the entire file made as a long single line, so I can use
      simple regex to seach the file and not have stuff missed because its over
      multiple lines..

      I know I can do it with a foreach loop.. but I was hoping that there was a
      way to avoid the extra step.


      Does anyone know of anything that would be useful to me here? or should I
      just go ahead and make it a single line buy using a foreach loop, chomping
      off the newline and appending each line to the last one...


      any tips would as always be fantastic and much appreciated.


      rgds

      Franki
    Your message has been successfully submitted and would be delivered to recipients shortly.