Is there a passably elegant way to persuade a Perl here document to repeat lines, e.g. under control of an external foreach?
I'm trying to generate a sequence of routing commands like
ip rule add fwmark 0x0201/0xffff table 201 ip rule add fwmark 0x0200/0xffff table 200 ip route add default via 172.27.201.1 dev eth1.201 table 201 ip route add default via 172.27.200.1 dev eth1.200 table 200
and while putting them in a here document is by far the most readable approach it would be a great improvement if the repeated lines- where the count might vary- could be generated on the fly.
MarkMLlIn reply to hiccoughing here documents by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |