Here, if you run this code in IE or FireFox you will see the code I am trying to save in red.
#!/usr/bin/perl use strict; use CGI qw(:standard); use CGI::Carp; use CGI::Carp qw(fatalsToBrowser); my $q = new CGI; #generate #. my $freaky_number=int(rand(9999)) + 1; my $check_number=rand(9999); print $q->header(); print "Start Testing<br><br>"; my $k_weather = "../weather/weather_".$freaky_number.".txt"; my $render_code; print "Path: $k_weather<br><br>"; #exit; #=comment open(DDATA_IN, ">$k_weather") || warn "Can't open output file $k_we +ather: $!"; print DDATA_IN "<script type=\"text/javascript\" language=\"JavaScr +ipt\"\n"; print DDATA_IN "src=\"http://www.gmodules.com/ig/ifr?url=http://www +.windfinder.com/widget/windfinder-igoogle-gadget/windfinder_igoogle.x +ml&amp;\n"; print DDATA_IN "up_station=North%20America%20\n"; print DDATA_IN "-%20USA%20\n"; print DDATA_IN "-%20Massachusetts%20\n"; print DDATA_IN "-%20East%20of%20Boston%20Buoy%20\n"; print DDATA_IN "-%20%5Bus189%3Beast_of_boston_buoy%5D&amp;\n"; print DDATA_IN "up_wind_speed=1&amp;\n"; print DDATA_IN "up_wind_direction=1&amp;\n"; print DDATA_IN "up_wind_gusts=1&amp;\n"; print DDATA_IN "up_wave_height=1&amp;\n"; print DDATA_IN "up_wave_direction=1&amp;\n"; print DDATA_IN "up_wave_period=1&amp;\n"; print DDATA_IN "up_air_temperature=1&amp;\n"; print DDATA_IN "up_clouds=1&amp;\n"; print DDATA_IN "up_precipitation=1&amp;\n"; print DDATA_IN "up_speed=mph&amp;\n"; print DDATA_IN "up_temperature=fahrenheit&amp;\n"; print DDATA_IN "up_height=ft&amp;\n"; print DDATA_IN "up_precipitationU=inch%2F3h&amp;\n"; print DDATA_IN "synd=open&amp;\n"; print DDATA_IN "w=500&amp;\n"; print DDATA_IN "h=310&amp;\n"; print DDATA_IN "num_days=2&amp;\n"; print DDATA_IN "num_cols=2&amp;\n"; print DDATA_IN "title=test.com+-+Windfinder&amp;\n"; print DDATA_IN "lang=en&amp;\n"; print DDATA_IN "country=ALL&amp;\n"; print DDATA_IN "border=%23ffffff%7C0px%2C1px+solid+%23004488%7C0px% +2C1px+solid+%23005599%7C0px%2C1px+solid+%230077BB%7C0px%2C1px+solid+% +230088CC&amp;\n"; print DDATA_IN "output=js\">\n"; print DDATA_IN "</script>\n"; close DDATA_IN; open(DATA, "$k_weather") || warn "Can't open output file $k_weather +: $!"; undef $/; # Slurp mode $_ = <DATA>; my @render=$_; $render_code=join("",@render); close DATA; print "$render_code<br>"; my $code="<script type=\"text/javascript\" language=\"JavaScript\"> document.write('<xmp>'+((document.all) ? window.document +.body.outerHTML :document.getElementsByTagName('html')[0].innerHTML)+ +'</xmp>'); </script>"; open(DATA_OUT, ">$k_weather") || warn "Can't open output file $k_wea +ther: $!"; print DATA_OUT $render_code; close DATA_OUT; print "<br><font color=red>I need this saved::<b>Rendered Code::: $cod +e</b></font><br><br>";

Thanks for looking!

In reply to Re^2: Rendered Source with Perl by Anonymous Monk
in thread Rendered Source with Perl by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.