Using say in Perl
Tutoring computer science, new language ideas will always be noticed. The tutor mentions the Perl construct say.
use v5.10; #Apparently you need this to use say.
$var1=”Hey there:)”;
say $var1; #same effect as print “$var1\n”;
$var1=”Hey there:)”;
say $var1; #same effect as print “$var1\n”;
I’ve never known of say, but I tried it on a console and indeed, it works. I needed to include use v5.10; for say to work. I understand, however, that the version can be higher.
Source:
Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.
Leave a Reply
You must be logged in to post a comment.