#!/usr/bin/perl use strict; use URI::Bookmarks; my $bookmarks = new URI::Bookmarks(file => "$ENVHOME}/.netscape/bookmarks.html"); my $bookmarks = new URI::Bookmarks(handle => $fh); my $bookmarks = new URI::Bookmarks(array => \@lines); # Manipulate $bookmarks using nice tree methods from Tree::DAG_Node, # e.g. delete all bookmarks under $folder: ($bookmarks->name_to_nodes($folder))[0]->unlink_from_mother(); # Then output the new file. print $bookmarks->export('Netscape array');