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

Stock Management: Step 1

Let us summarize using .NET classes with a sample program, which manages the stock of a small store. The program supports three commands:

  • add: adds new item to stock

  • quit: exit program

  • help: show help

If a user chooses to add an item, he or she is asked to enter a name for a new item. Our program generates a new id, and we build a string in the following format:

<id> <item_name>

Afterwards, we capitalize all first letters of words in the item name and store the information. To make our program more ambitious, the stock information is stored in the text file Stock.txt. To perform the file output operations, we introduce another .NET class: StreamWriter. We construct the StreamWriter object and pass to its constructor ...

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