Hi monks, by using the following code, I want printed data to be displayed in the text box...but all that I get within the textbox is the following: Bio::SeqFeature::Generic=HASH(0x6547e0), etc. Please Help!
Many thanks! Code: #! /usr/local/bin/perl -wT use strict; use CGI qw / :standard /; use CGI::Pretty; use Bio::SeqIO; use Bio::Root::IO; use Bio::SeqFeature::Generic; use Bio::Location::Simple; use Bio::Location::SplitLocationI; use File::Temp; my @features = read_file(param('file')); print header, start_html('Plasmid Feature Editor'); print h1('Plasmid Feature Editor'); print p('Load up a Genbank file to work with, then edit the features i +n the text box.'); print <<END; <BODY BGCOLOR = "#ffffcc"> END print start_multipart_form(), table({-cellpadding => 10}, TR({-class=> 'resultsbody'}, td(textarea(-name => 'editarea', -value => "@features", -rows => 20, -cols => 70, -override => (@features) || (param('clear')), ), ), ), TR({-class=>'resultstitle'}, td(filefield(-name => 'file', -length => 40), ), td(submit(-name => 'submit_button', -value => 'Click to display features'), ), ), TR({-class=>'resultstitle'}, td(submit(-name => 'save_button', -value => 'Click here to save your work'), ), td(reset(), ), ), ), end_form; print <<FINISH; </BODY> FINISH print end_html; exit 0; sub read_file { my $fh = param('file'); my $gb_parser = Bio::SeqIO->new(-fh=>$fh,-format=>'Genbank'); my @features; while (my $seq = $gb_parser->next_seq) { push @features, $seq->get_all_SeqFeatures(); } return @features; }

Edited by Chady -- added code tags.


In reply to Displaying data? by Gono

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.