# I use DBI; # and use DBD::Sybase; # almost daily. # And I never forget to use strict; # to scope my $variables; # carefully. my $server = 'is located some where'; my $database = 'has gigabytes of data here and there'; # Please give me my $database_handle = # and I want to connect successfully with DBI->connect("dbi:Sybase:server=$server;database=$database", "without", "any_trouble") or # my script will die "but not before I throw some warnings"; # Then I search for my $data = # in the $database_handle-> # I first prepare("-- my SQL with a SELECT * FROM data WHERE -- I limit the data set size = 'to something not too large'"); # Then I retrieve my $data-> # after I execute(); # the query # And let me loop through the result while # I still have something to worry # I have (my @results = $data->fetchrow()) { # but I want to throw them away } # When I have gone through all the $data-> # and I want to finish; # I close the $database_handle-> # with disconnect; # and go sip a cup of tea.

In reply to After a long day of database programming at work (my first perl poem :-) by Roger

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.