search
LoginSignup
0

More than 5 years have passed since last update.

posted at

Perl ワンライナーで直積

小規模な直積集合を求めたいときとか。
Perl 5.14.2
他のversionでも動くかどうかはちょっとわからないです(笑)

[@ichirin ~]$ perl -e '@a = @{[<{a,b,c}{1,2}{A,B,C,D}>]}; print"@a\n"'
a1A a1B a1C a1D a2A a2B a2C a2D b1A b1B b1C b1D b2A b2B b2C b2D c1A c1B c1C c1D c2A c2B c2C c2D

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
0