正規表現を使用してPerlで2つの区切り文字の間の値を取得しようとしています。私はファイルを開き、chompを使ってファイルを1行ずつ調べています。ファイルがどのように見えるかの例: "This is <tag> an </tag> example
of the <tag> file </tag> that I
am <tag> trying </tag> to <tag> parse </t
puts "Enter the first number"
num1 = Float(gets)
puts "Enter the second number"
num2 = Float(gets)
puts "Enter the operation"
op = gets
op = op.chomp # <--- THIS LINE!
case op
when "+" then