fetch

fetch is used to grab a row of data and return an array reference. This returns a single row of data as an array reference, where each item in the array is an item in the row. The name "fetch" is short for "fetchrow_arrayref"—the two names mean the same thing, and call the same function.

Example:

while ($ref = $handle->fetch){     print join(‘, ‘, @$ref), "\n"; }

This prints each row of data left in the $handle, with each field separated by a comma and a space.



Perl Database Programming
Perl Database Programming
ISBN: 0764549561
EAN: 2147483647
Year: 2001
Pages: 175

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net