だいぶ初歩的な質問ですみません。
下記のようなtextデータがあるとします。
sv1 , eth0 sv1 , eth1 sv2 , eth0 sv2 , eth1 sv2 , eth2 sv2 , eth3 sv3 , eth0
これを下記みたいな配列にしたいです。
$node{"sv1"}[0]="eth0"; $node{"sv1"}[1]="eth1"; $node{"sv2"}[0]="eth0"; $node{"sv2"}[1]="eth1"; $node{"sv2"}[2]="eth3"; $node{"sv3"}[0]="eth0";
データ数等は不明なので、pushでやりたいのですが、うまく実現出来ません。
#csvのリストを@listに代入済み。 # foreach $a (@list) { push(@node{$a->[0]},$a->[1]); } Not an ARRAY reference at ./tmp.pl line XX.
どうしたらよいでしょうか。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/04/11 12:19