Input/Output
As we stated in the previous section, all Core Perl constructions may be brought into use in PerlNET. Input/output issues are not an exception.
Performing Output
Instead of using a long call to the WriteLine method of the Console class, we can write
print "Hello from Perl!\n";
and we will get the same result as if had written
Console->WriteLine("Hello from Perl!");
The reason we use the Console class rather then Core Perl print is to demonstrate the .NET concepts on simple examples and to show the .NET way to do things. You may combine Core Perl and .NET statements to perform output. However, you may run into buffering problems when running the program in some environments, so that your program output would not be in the original ...
Get Programming PERL in the .NET Environment now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.