Artificial intelligent assistant

perlでファイルの指定文字列を取り出し、変数へ格納 sample.txtABC 20 31 7 abcdefg ... print""; chomp(my $file = <STDIN>); open (IN, $file) or die; my $para = qr/(\d+)\s(\d+)\s(\d+)/x; if (<IN>=~ /$para/) { my $A = $1; my $B = $2; my $C = $3; }

split


#!/usr/bin/perl

my $file = "sample.txt";

open(FH,"<$file") or die;
my $line = ;
chomp($line);

##
my ($A,$B,$C) = $line =~ /(\d+) (\d+) (\d+)/;
##
## or
## ""split
#my ($A,$B,$C) = split(/ /,$line);

print "A: $A\
";
print "B: $B\
";
print "C: $C\
";

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy a6304ded28a9309b9316cc6a22fb42df