PPT Slide
Perl Example - writing to an ascii flat file
# Create a name that will open for writing
$SQL_FILENAME1 = "> my_filename.sql";
open (TEMP_SQL,$SQL_FILENAME1) || print
"Can't open temp sql output file: $SQL_FILENAME1 in shelter_query2.pl<BR>\n$!<BR>\n";
$SQL = "unload to ${SQL_FILENAME3}\n"; # Populate string
$SQL .= "select * from $TABLE_NAME1\n"; # Append to string
print (TEMP_SQL "$SQL\n"); # Write the SQL statement to the temp file
close TEMP_SQL; # Close the temp SQL file
unlink ($SQL_FILENAME2); # Delete the temp SQL file
No native equivalent capability.