perl 置換リスト 配列

Quick Edit Pencil

our @WORDS = (

[$triggerWord,''],

['^.*?id="layout-css|options-css|theme-css|page-css" />','<op> -d'],

['id="script-js"></script>','<op> -d -setStart -JS'],

['</script>','<op> -d -setEnd -JS'],

['id="bind-tag-cleaner-config-js">','<op> -d -setEnd'],

['</script>','<op> -d -setEnd -JS'],

['</script>','<op> -d -setEnd -JS']

);

第12回 2次元配列 - bingo_nakanishiの他言語出身者のためのPerl入門

se strict;
use Data::Dumper;

# 1次元配列
my @c = ('a', 'b', 'c');
my @d = ('e', 'f', 'g');
my @e = ('h', 'i', 'j', 'k', 'l');


# リファレンスで持たせるんだ!!!!
my @f = (
         \@c,
         \@d,
         \@e
        );

print Dumper \@f;

結果:

$VAR1 = [
          [
            'a',
            'b',
            'c'
          ],
          [
            'e',
            'f',
            'g'
          ],
          [
            'h',
            'i',
            'j',
            'k',
            'l'
          ]
        ];

このブログの人気の投稿

WP: 投稿一覧にカスタム分類・タクソノミーのカラムを追加する

AutoHotkey+powershell タスクバーをバーを自動的に隠すショートカット

Windows 10で、Explorerのナビゲーション ウィンドウの表示/非表示を、キーボードショートカットで切り替える方法

Windows10でアプリケーションごとに輝度を設定、自動で変更する - AutoHotkey

AppleScriptとターミナルでJavaScriptを使う

書字方向 横書方向変換スクリプト 左書きから右書きへ(コピペ用途)

onloadの代わりにDOMContentLoadedを使ってみる