#!usr/bin/perl -w use strict; my @strings = glob "{abc}{0,p,z}"; #to enumerate the combinations print "@strings\n"; #abc0 abcp abcz