Why bother?
one line: ...code...;
more than one: ...code...;;
But, to parse perl use PPI/PPIx::XPath ( example Perl::Critic::Policy::ValuesAndExpressions:: GivenWhenTryCatchLexicalDollarUnderDefaultVarBindingConfusion )
$ ppi_dumper 2 PPI::Document PPI::Statement::Compound PPI::Token::Word 'for' PPI::Structure::List ( ... ) PPI::Statement PPI::Token::Number '1' PPI::Token::Operator '..' PPI::Token::Number '10' PPI::Structure::Block { ... ??? $ ppi_dumper 3 PPI::Document PPI::Statement::Compound PPI::Token::Word 'for' PPI::Structure::List ( ... ) PPI::Statement PPI::Token::Number '1' PPI::Token::Operator '..' PPI::Token::Number '10' PPI::Statement::Null PPI::Token::Structure ';' PPI::Token::Whitespace '\n'
So a PPI::Statement::Compound without a closing block parenthesis, means continue
$ cat 2 for(1..10){ $ cat 3 for(1..10);
In reply to Re: howto parse (or determining end) of a line of perl
by Anonymous Monk
in thread howto parse (or determining end) of a line of perl
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |