Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次の命令を使用して、ファイルからスペース区切りの行を解析しています。
($F1,$F2) = split(/\s/,$_);
そして、次のような行で
TEXT1 TEXT2 TEXT3
私だけではない必要$F2があります。どうやってやるの ?TEXT2 TEXT3TEXT2
$F2
TEXT2 TEXT3
TEXT2
ありがとう
split3 番目の引数 LIMIT (つまり、分割するフィールドの数) を渡すことができます。
split
($F1,$F2) = split(/\s/,$_,2);