I think I remember LanX talking about a REPL of his where a new line would be prompted and concatenated to the current statement until it did compile. To check for compilation without actually executing anything you can do something like: eval "sub DUMMY { $code }; 1" or die "Failed! $@". Any use statment or BEGIN block will still be executed though.
Of course this requires a way to cancel the current input, maybe with an EOF token in Linux, or anything that you are not going to put in actual perl code.
Edit: rephrased the first sentence for clarity.
In reply to Re: howto parse (or determining end) of a line of perl
by Eily
in thread howto parse (or determining end) of a line of perl
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |