O'Reilly logo

Mastering Perl/Tk by Nancy Walsh, Stephen Lidie

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Deleting Items

To remove an item (or more than one item) from the Canvas completely, use the deletemethod. It takes a list of tags or IDs to remove from the Canvas. It will delete all matches it finds for the tag names, so be careful you aren’t deleting something you don’t want to delete. Here is an example that uses three separate tag/IDs:

$canvas->delete("blue", "circle", $id_num);

You can specify only one tag/ID or as many as you want.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required