in reply to Re^2: Printing from three arrays
in thread Printing from three arrays
perl -e '@_=split(/=/, $_) and print join(", " ,@_[2,0,1]),"\n" for glob "{a,b,c}={I,II,III}={1,2,3,4}"'
it's cumbersome, though. I tried something with unshift pop but it was longer.
perl -E '@_=split /=/ and unshift(@_,pop @_) and say join ", ", @_ for glob "{a,b,c}={I,II,III}={1,2,3,4}"'
perl -E '@_=split /=/ and say join ", ", unshift(@_, pop @_) && @_ for glob "{a,b,c}={I,II,III}={1,2,3,4}"'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Printing from three arrays
by AnomalousMonk (Archbishop) on Sep 26, 2019 at 23:36 UTC |