Help for this page
... foreach(@_) { ... my $ext = ( $file =~ /\.([^.]+)$/ ) ? $1 : "DIR"; print ...; } }
Also remember that "|" is interpreted as a literal within square brackets, so if you write "[fee|fie|foe]" you're really only matching "[feio|]".