# import a single constant $ perl_sam_const 'use Sam::Constants qw{ABC_2}; say ABC_2' 2 # check that other ABC_* constants are not imported $ perl_sam_const 'use Sam::Constants qw{ABC_2}; say for ABC_1, ABC_2, ABC_3' Bareword "ABC_1" not allowed while "strict subs" in use at -e line 1. Bareword "ABC_3" not allowed while "strict subs" in use at -e line 1. Execution of -e aborted due to compilation errors. # import all ABC_* constants $ perl_sam_const 'use Sam::Constants qw{:abc}; say for ABC_1, ABC_2, ABC_3' 1 2 3 # import all ABC_* and GHI_* constants (using two tags) $ perl_sam_const 'use Sam::Constants qw{:abc :ghi}; say for ABC_1, GHI_2' 1 8 # import all ABC_* and DEF_* constants (using just one tag) $ perl_sam_const 'use Sam::Constants qw{:abcdef}; say for DEF_3, ABC_3' 6 3 # import all constants $ perl_sam_const 'use Sam::Constants qw{:all}; say for ABC_1, DEF_2, GHI_3' 1 5 9