in reply to Extracting a list of selectors from a css file

You could simply loop through the object's data structure (usual caveats apply):
#!/usr/bin/perl use strict; use warnings; use CSS; my $css_data = do{ local $/; <DATA> }; my $css = CSS->new(); $css->read_string( $css_data ); foreach my $style ( @{ $css->{ styles } } ) { foreach my $selector ( @{ $style->{ selectors } } ) { print $selector->{ name } . "\n"; } } __DATA__ .selector_one { margin-left: 1em; } .selector_two, .selector_three { margin-left: 1em; }