my $input_text; { local $/; # turn on slurp mode within this block open( my $input, "<", $ARGV[0] ); $input_text = <$input>; } $parser->my_first_rule( $input_text ); #### first_rule : identifier | binops | lbinops | integer | number