advertisement

O'Reilly Tags

We're experimenting with a folksonomy based on tag data provided by del.icio.us. Follow development in this blog post.


Using Perl to Manage Plist Files (3 tags)
A common question is how to manage complex Plist files with scripts. The defaults command, which is often used to manage simple values in Plist files, does not easily manage the nested arrays or dictionaries that are present in most Plist files. In this first article of a two-part series, James Reynolds pulls together a little Perl and Cocoa to solve this problem.

Using Perl to Manage Plist Files, Part 2 (2 tags)
Part 2 goes into much more detail on managing Plist files. You'll change some values and save the altered Plist file back to disk. Then you'll loop over entries in a Plist file, get a dump of the NetInfo database, and print all the users in the database using Perl foreach loops. To do that you'll convert the Cocoa dictionaries and arrays to Perl hashes and arrays. Finally, you'll create a Plist file from scratch, build the sample Xgrid cal job listed in the Xgrid man page by creating the structure using Perl hashes and arrays, and then convert them to Cocoa equivalents.