Summary

This hour you learned about how to leverage your system's utilities to do work for you. The system function allows you to run a system utility (or a pipeline). The backticks ('') run a system utility and then capture the output. The captured output can then be stored in a variable for use by Perl. The open function can open not only files, but programs as well. The programs can be written to with print or read from with the angle operator (<>). Finally, you were shown some techniques for using these utilities on many different kinds of systems without having to write different programs for each.

Get Sams Teach Yourself Perl in 24 Hours 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.