Chapter 15 . Perl Development 421 The first

Chapter 15 . Perl Development 421 The first argument, $sth or the statement handle, is required. The second argument, represented by $length in the example, is the maximum length for the results to print. The third and fourth arguments specify how you want to separate the lines and fields respectively. The default for a line break is the newline (n), and the default for a field separator is a comma. The final argument, represented by $filedes, is a pointer to a file handle to indicate a file to which the results should be dumped (instead of to the screen) on STDOUT. You don t save the results of the dump_results() method; rather, you use Perl s print function to print them. More than one figure is necessary to fully illustrate the syntax and use of the dump_results()method. Figure 15-35 shows a basic instance; Figure 15-36 shows a basic usage. Figure 15-36 demonstrates setting a maximum length for the second argument. Figure 15-35: A basic use of the dump_results() method Figure 15-37 shows a usage of field separators and the manual setting of line breaks; Figure 15-38 demonstrates the use of a file handle to dump results into a file instead of to the screen.
If you are looking for cheap and quality webhost to host and run your website check Jboss Web Hosting services.

Leave a Reply