Skip to Content
Programming PERL in the .NET Environment
book

Programming PERL in the .NET Environment

by Yevgeny Menaker, Michael Saltzman, Robert J. Oberg
September 2002
Intermediate to advanced content levelIntermediate to advanced
496 pages
10h
English
Addison-Wesley Professional
Content preview from Programming PERL in the .NET Environment

Main Sample

In this section, we combine the knowledge that we provided throughout this chapter. We present the full example program, which you should easily understand. We use the Console class, since we want you to feel comfortable when combining .NET types with Core Perl statements and expressions.

Our sample performs calculations of binary operations (+, –, *, /). It gets as an input an expression (x op y) where x and y are integer positive numbers and op is one of the four operators mentioned above. Our .NET program validates the input using Perl regular expressions (!) and then evaluates the expression. To test the following code, refer to the MainSample\BinOper folder.

 # # BinOper.pl # use namespace "System"; use PerlNET qw(AUTOCALL); ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Sams Teach Yourself Perl in 21 Days, Second Edition

Sams Teach Yourself Perl in 21 Days, Second Edition

Laura Lemay, Rafe Colburn
Pro Perl

Pro Perl

Peter Wainwright

Publisher Resources

ISBN: 0130652067Purchase book