onlineviewer wrote:
Hello All,
Hello,
Can someone tell me the proper syntax to print out the value in a reference?
I assume you mean how to dereference a reference? perldoc perlref
Thank you.,, my $string = ''; open my $scalar_fh, '>>', \$string; my $log_message = "here is my string..."; print $scalar_fh $log_message; foreach my $fh ($scalar_fh ) { print "$fh";
$scalar_fh is a filehandle and you are converting it to a string. Perhaps you just wanted to print the contents of $string?
print $string;
}
John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order. -- Larry Wall -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/