外部ファイル(CSVなど)を読み込んで処理させる検証プログラムを作成する時、わざわざ外部ファイルを作らなくてもDATAトークンで実現可能です。
sample.pl
while ( my $line = <DATA> ) {
・・・なんかの処理
}
__DATA__
1,hoge,fuga
2,hogehoge,fugafuga
More than 5 years have passed since last update.
外部ファイル(CSVなど)を読み込んで処理させる検証プログラムを作成する時、わざわざ外部ファイルを作らなくてもDATAトークンで実現可能です。
while ( my $line = <DATA> ) {
・・・なんかの処理
}
__DATA__
1,hoge,fuga
2,hogehoge,fugafuga
Register as a new user and use Qiita more conveniently