Hi. I wanted to print out the line below that was obtained from a text file without including the ";" at the end. How can I do that?
INPUT A, B, C, D;
#READ input A, B, C, D; my $INPUT_DATA = $_; if (defined($INPUT_DATA) && ($INPUT_DATA =~ /INPUT (.*)/)) { my $input_data = $1; my @input_array = split /,/, $1; my $size_input = @input_array; print "Input = "; print scalar "@input_array\n"; print "Number of input = $size_input\n"; }
In reply to Pattern matching by nursyza
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |